how to get a Ocp-Apim-Subscription-Key for https://api.cognitive.microsofttranslator.com/translate?api-version=3.0

Zhi Xing Liu (CSI Interfusion Inc) 20 Reputation points Microsoft External Staff
2023-08-23T14:56:01.48+00:00

Hi

our project wants to use https://api.cognitive.microsofttranslator.com/translate?api-version=3.0 for translation, and we know that we need to pass Ocp-Apim-Subscription-Key when calling the api.

my question is where/how should I generate a Ocp-Apim-Subscription-Key please.

thanks!

Azure AI Translator
Azure AI Translator
An Azure service to easily conduct machine translation with a simple REST API call.
489 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,650 questions
0 comments No comments
{count} votes

Accepted answer
  1. romungi-MSFT 48,916 Reputation points Microsoft Employee Moderator
    2023-08-23T16:40:33.3+00:00

    @Zhi Xing Liu (CSI Interfusion Inc) For azure translator service you should use the key from the Azure translator resource form azure portal. Just search for your translator resource on azure portal and use the key from keys+Endpoints blade.

    User's image

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. Dillon Silzer 57,831 Reputation points Volunteer Moderator
    2023-08-23T15:51:31.1+00:00

    Hello Zhi,

    Please see the following screenshot for finding the key:

    Go to API Management services > find your Name of your service > APIs > Test tab > Go to the headers, and your key will be hidden (you can click the eye to see the hidden key).

    User's image

    Cited from https://stackoverflow.com/questions/40867834/where-to-find-my-ocp-apim-subscription-key-in-windows-azure


    If this is helpful please accept answer.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.