Sten Govaerts
Sten Govaerts

Reputation: 43

Azure Translator OAuth token GET api does not work

While trying out the Azure Translator Text API, I stumbled on some problems with the App ID or Subscription ID. It seems confusingly the App ID in the documentation, is not the Subscription ID one can find in the Azure portal, but rather Key 1 in the Resources > Keys menu. I was able to figure this out during a Twitter troubleshooting session with Azure's team. Thanks, guys!

With this Key 1, I am able to retrieve an OAuth token using the POST request. Azure provides a Swagger tryout form here: http://docs.microsofttranslator.com/oauth-token.html

However, there is also a GET service to retrieve the oauth token, but this one does not work, neither with Key 1 and Key 2. When I try this URL: https://api.cognitive.microsoft.com/sts/v1.0/issueToken?Subscription-Key=key1-or-key2 it always returns:

{ statusCode: 404, message: "Resource not found" }

The Azure help team asked me to post this on StackOverflow for further help. Does anyone have an idea what I am doing wrong?

Upvotes: 1

Views: 1019

Answers (1)

kwill
kwill

Reputation: 11008

Both of those formats work, but they are both POST operations, not GET. If you are seeing somewhere in the docs that indicates a GET operation please let us know so we can correct it.

Upvotes: 1

Related Questions