Reputation: 370
The Microsoft Azure portal for TextTranslator provides the following endpoint:
https://api.cognitive.microsoft.com/sts/v1.0
Yet this endpoint returns a 200 for issueToken and 404 for Translate. The samples refer to an endpoint of:
https://api.microsofttranslator.com/v2/http.svc/
The docs being out of date given the translator ending in the datamarket was my initial assumption. However, the doc endpoint returns for the Translate method.
http://docs.microsofttranslator.com/text-translate.html#!/default/get_Translate
Which endpoint is it that we should use?
If supposed to use the api.microsofttranslator.com then what is the api.cognitive.microsoft.com in azure for?
Upvotes: 6
Views: 1543
Reputation: 27400
You can use Microsoft Translator API in 2 ways (see the docs):
Ocp-Apim-Subscription-Key: your_subscription_key
as request headerSubscription-Key=your_subscription_key
as query parameter or better passing Ocp-Apim-Subscription-Key: your_subscription_key
as request headerAuthorization: Bearer the_token
as request headerUpvotes: 3