IBM Watson Translate apikey authorization failure with Postman

Viewed 718

IBM Watson Translate is working with curl, but we can't get it to work with Postman. We have an apikey but I don't know where to put it in Postman. I looked through the Authorization tab and didn't see any options that accept an apikey (the options include Basic Auth, Digest Auth, etc.). I tried putting our apikey in Params and in Headers but we always get back 401, Unauthorized. Our apikey works with curl.

1 Answers

On Postman, you can use Basic Auth with "apikey" as your Username and the apikey value shown on the Watson Language translator service as your password as shown in the image below.

enter image description here

Body will be raw JSON with the content-type set to "application/json"

{"text":["Hello"],"model_id":"en-es"}

enter image description here

Related