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?
Translator, part of Azure Cognitive Services, is a cloud-based machine translation service that can be used to build applications, websites, tools, or any solution requiring multi-language support. Built for business, Translator is a proven, customizable, and scalable technology for machine translation.
Prerequisites. Once you have your Azure subscription, create a Translator resource in the Azure portal. After your resource deploys, select Go to resource and retrieve your key and endpoint. You need the key and endpoint from the resource to connect your application to the Translator service.
Translator Service is a cloud-based neural machine translation service that is part of the Azure Cognitive Services family of REST APIs.
Azure Cognitive ServicesTranscribe audible speech into readable, searchable text. Convert text to lifelike speech for more natural interfaces. Integrate real-time speech translation into your apps. Identify and verify the people speaking based on audio.
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 headerFor the translator API, you need to first get an auth token (first link), and with this token you can call the Translate api (second link).
You can learn more about the auth step here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With