0

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?

Nitin Bhardwaj
  • 213
  • 1
  • 2
  • 6
  • That v1 API is still available: https://cloud.ibm.com/apidocs/assistant/assistant-v1 Please format your question. Are you on a supported API V1 version (date)? – data_henrik Feb 12 '20 at 14:02
  • Actually, I've already mentioned that I am using the following API: https://gateway.watsonplatform.net/conversation/api/v1 (version 2017-04-21). However, I am not aware of whether this API is still supported and I also didn't find anything on the internet related to this. – Nitin Bhardwaj Feb 13 '20 at 08:36
  • For links to info about migrating, see https://stackoverflow.com/a/60039767/5494819 – Allen Dean Feb 13 '20 at 12:14

1 Answers1

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.

chughts
  • 4,210
  • 2
  • 14
  • 27