An Azure service to easily conduct machine translation with a simple REST API call.
API translate: The request is not authorized because credentials are missing or invalid.
nickCroat
116
Reputation points
Hi,
I created new Azure account, free one, I am using all corect data but all the time response is:
The remote server returned an error: (401) Unauthorized.
I tired in postman in regular code of web page... on Azure it is stated:
Status: Active
Location: West Europe
API Kind: TextTranslation
Pricing tier: Free
Any help please?
$headers = @{
"Ocp-Apim-Subscription-Key" = "mykeysomething..."
"Ocp-Apim-Subscription-Region" = "westeurope"
"Content-Type" = "application/json"
}
$body = '[{"Text":"Ovo je tekst koji želim prevesti"}]' Invoke-WebRequest -Uri "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&from=hr&to=fr" `
-Method POST -Headers $headers -Body $body
Azure Translator in Foundry Tools
Azure Translator in Foundry Tools
Sign in to answer