I have created an instance for the Watson Dialog service on Bluemix. I'm authenticating to the Dialog API through a Mobilefirst Adapter using Basic authentication as specified in IBM Watson Dialog API reference . I'm providing the username and password provided in the service credentials for the service instance in Bluemix.
When I call the adapter I get this response:
{
"code": 500,
"isSuccessful": true,
"message": "Forwarding error",
"responseHeaders": {
"Connection": "Keep-Alive",
"Content-Type": "application\/json",
"Date": "Tue, 12 Jul 2016 13:41:04 GMT",
"Server": "-",
"Set-Cookie": "Watson-DPAT=ZRbNg044CHnee09Pm0UOAKxqVbY4fZHXWj6%2Bb4mWeYkG56h873G%2F0A1jKTBH8zWK7NJjgYtkx1SaekClhk4CoZhad0PwuORRRdwkiXhAUh03uEnEqyDWh6n0WBIVxNWOoAAoxUMAqTDxfw%2BMHtwngXyZe47TZYk7IdsvsV%2F0bhLoAF6GS8YEwaamX7b7tfqchTfoQ3%2FIF7TbktyfJ9L8tUiQrwZyLlJcWv5Typn93J1km5Jl%2Fvc4K3W7zvtVygYeurP9Bb1slAp1PRGIppn97W%2F%2F3I%2FkKq3VS0VVo5BZXhvBf7SS%2FJg5mwQ8wbTyMqjIZXqF1zKuZ5FvlLJcYX%2BvFeJG28j429rDOvpIihOn%2FmMNV9eYeAubZQ929beB32dX90B1ChNwiYMFWe9cV7ONbaUCOLpzrO6rLKFtfeonRgsp0a6wdN3KLaBWJ9A4eB%2Fjffhfgro7N3iskxjCi5jkhgY0WOGdpg4kQmbq%2F%2F3b2a0GCP6hrYn%2BJL%2BfGNYg8wcb7xLmCRN77XwP8HqCeJ6TChi8YRpheO5CVjOlP0E5QOHAYWMTxDsLe4tV34FnPYSSvxVNY9f9sALsf627ymoOcG2r03tetgsR44f9MlkFGeydbfPtAVBZidVDLzajMqcigMf9J%2B92NXGXBVypFnu4gIkb5Uee0Duf8gRcMQSJ3M%2BhbFN4UzePYh4FLXfJv5EvQOm5AJewTtJcnrsxZfiXVDdVqNDpv3c3XWN%2F5Cenc7uKtlkFuwsnusJoBOvYQXLuMuJiDT9ODHwMn8vaM9qIZy9Mo4zReKDBnZXrlwTCphLEzhTCng6X24e46C29W8SgK97AhK4H3hY%3D; path=\/dialog\/api; secure; HttpOnly",
"Transfer-Encoding": "chunked",
"X-Backside-Transport": "FAIL FAIL",
"X-Client-IP": "195.212.29.160",
"X-DP-Watson-Tran-ID": "gateway-dp02-2901289c-0679-40df-bdc0-db2d7ccd8847",
"X-Error-Cause": "Zuul Error: COMMAND_EXCEPTION",
"X-Global-Transaction-ID": "10770268"
},
"responseTime": 1210,
"statusCode": 500,
"statusReason": "Internal Server Error",
"totalTime": 1372
}
Also, when trying to authenticate to the service via the command line using:
curl -u "username":"password" "https://gateway.watsonplatform.net/dialog/api/v1"
I get the response:
{"code": 500, "message": "Forwarding error"}
What is it happening with the service?
It is also happening to me with the other Watson service: Languaje Translator. (I haven't checked yet with the others)
The problem is that https://gateway.watsonplatform.net/dialog/api/v1 is not a valid endpoint. In this case Forwarding error
is kind of like a 404.
You can use the Watson Dialog API specification to see which are the valid endpoints.
For example, to get the list of dialogs you do a GET
request to /v1/dialogs
:
curl -u "username":"password" \
"https://gateway.watsonplatform.net/dialog/api/v1/dialogs"
The output is something like:
{
"dialogs": [
{
"name": "pizza_test_9",
"dialog_id": "94ce77db-1d15-4438-be6f-c96be8d883a6"
}
],
"language_packs": [
{
"name": "en-us-legacy",
"dialog_id": "en-us-legacy"
},
{
"name": "en-us",
"dialog_id": "en-us"
}
]
}
Make sure you replace username
and password
with your service credentials.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.