David Powell
David Powell

Reputation: 547

Having trouble PUTting profile variables in Watson Dialog service

I think this is actually two (related) problems. If I try to set profile variables in the Watson Dialog API via Postman, I don't get any errors (200 return code) but the variables don't get set. This is the data I'm sending:

{
  "client_id": 152008,
  "name_values":[ 
    {
      "name": "second",
      "value": "2"
    }]
}

and this is the answer I get:

{
  "client_id": 152008,
  "name_values": []
}

Doing a GET confirms that the variables were not set.

If I try to do it via dialog.updateProfile() in the watson-developer-cloud package using the same JSON, I get

Error: Missing required parameters: name_values

instead.

Has anyone successfully set Watson Dialog profile variables? How did you do it?

Upvotes: 0

Views: 119

Answers (1)

Jim Hoskins
Jim Hoskins

Reputation: 270

The Dialog profile variable you wish to manipulate via the API needs to already exist in the Dialog XML file. You can not create a new Dialog profile variable via the API.

Upvotes: 1

Related Questions