The old Watson Conversation API (21st Apr 2017 version) seems to have stopped working. Gives me the 401 Unauthorized error

不打扰是莪最后的温柔 提交于 2020-04-30 11:42:26

问题


My application was using the Watson Conversation API (21st Apr 2017 version) imported as a maven dependency:

<dependency>
    <groupId>com.ibm.watson.developer_cloud</groupId>
    <artifactId>conversation</artifactId>
    <version>3.9.1</version>
</dependency>

I've checked the credentials (username and password) for correctness. However, it is still giving me the following error (I've replaced the actual conversation workspace id with the placeholder ACTUAL_WORKSPACE_ID in URLs):

Feb 12, 2020 6:14:40 PM okhttp3.internal.platform.Platform log INFO: <-- 401 Unauthorized https://gateway.watsonplatform.net/conversation/api/v1/workspaces/ACTUAL_WORKSPACE_ID/message?version=2017-04-21 (342ms, 37-byte body) Feb 12, 2020 6:14:40 PM com.ibm.watson.developer_cloud.service.WatsonService processServiceCall SEVERE: POST https://gateway.watsonplatform.net/conversation/api/v1/workspaces/ACTUAL_WORKSPACE_ID/message?version=2017-04-21, status: 401, error: Unauthorized Exception in thread "main" com.ibm.watson.developer_cloud.service.exception.UnauthorizedException: Unauthorized: Access is denied due to invalid credentials. Tip: Did you set the Endpoint? at com.ibm.watson.developer_cloud.service.WatsonService.processServiceCall(WatsonService.java:410)

I observed that the newer version of APIs is available and the IAM & Resource groups have been introduced in the IBM Cloud. Is this issue a result of these changes? Can we not use the older API any more?


回答1:


IBM Cloud is switching off any services that have not been migrated to a resource group. The Watson services were part of the first batch affected. You will need to migrate your instance to IAM, then use the generated IAM key for authentication.



来源:https://stackoverflow.com/questions/60189034/the-old-watson-conversation-api-21st-apr-2017-version-seems-to-have-stopped-wo

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