0

I tried to access my workspace and intent to get a reply from https://watson-api-explorer.mybluemix.net/apis/conversation-v1#!/message/post_v1_workspaces_workspace_id_message

But where to enter my service credential here?. I am trying to access IBM-Conversation API through http callout, POSTMAN and watson explorer. But failed in all places. But I am able to get reply in blumemix console with Try out option.

Please advice.

My related questions :

IBM Conversation API - What should be a endpoint URL and Parameters

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

Community
  • 1
  • 1
Ram
  • 33
  • 1
  • 5

2 Answers2

1

In Postman there is a section for creating the header where you would type your credentials. What error do you get when you make the call?

Mitch
  • 849
  • 4
  • 4
  • I added the service credential for conversation api in header. Is that right?. But I get Response Body { "error": "Resource not found" } – Ram Feb 17 '17 at 08:06
  • Same as davids comment above about doing in api explorer. Make sure you have your workspace_id in the API URL – Mitch Feb 17 '17 at 18:19
  • The URL should be like: https://gateway.watsonplatform.net/conversation/api/v1/workspaces/WORKSPACE_ID/message?version=2017-09-20 where the workspace id is obviously filled with your own. – Mitch Feb 17 '17 at 18:21
1

If you're using the API explorer, there are username and password fields at the top of the explorer.

Credentials fields on API explorer

Use the credentials that you are given in the Bluemix console. When you build you application, you provide those credentials tot he API via a Basic Auth header.

I hope that answers your question.

  • thanks for the reply . I tried entering the credential as you mentioned but the result is same. Response Body { "error": "Resource not found" }. I am using the service credential for conversation api. – Ram Feb 17 '17 at 08:02
  • Please make certain that you are using the workspace id, which you can find on the workspaces page of the Conversation tool, and not the service instance id. – davidgeorgeuk Feb 17 '17 at 08:42
  • You can find the workspace id by clicking on the three dots on the workspace tile and clicking "View Details". The workspace id appears in the middle of the tile, with the option to copy to clipboard. – davidgeorgeuk Feb 17 '17 at 08:43