IBM Watson - Conversation API integration returns Resource Not Found error (404)

 ̄綄美尐妖づ 提交于 2019-12-01 10:27:05
Michal Bida

The request body doesn't seem right. It should be JSON with e.g. this structure (see api ref. page in watson conversation service doc.):

{
  "input": {
    "text": "Hi"
  }
}

application/json should be the content type. Sample request with curl:

curl -X POST -u "{username}":"{password}" -H "Content-Type:application/json" --data "{\"input\": {\"text\": \"Hi\"}}" "https://gateway.watsonplatform.net/conversation/api/v1/workspaces/<workspace_id>/message?version=2017-02-10"

See the API Reference for more details: https://www.ibm.com/watson/developercloud/conversation/api/v1/

I had the same issue and I found that it's simply rate limiting that kicks in.

According to the docs here there is no limit for the endpoint, however that turns out to be untrue. If you send a few thousand messages in quick succession, you'll start getting 404 Not Found until the quota resets, which seems to take around 1 hour.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!