Azure-Samples / Cognitive-Speech-STT-Windows

Windows SDK for the Microsoft Speech-to-Text API, part of Cognitive Services
https://www.microsoft.com/cognitive-services/en-us/speech-api
Other
112 stars 88 forks source link

The remote server returned an error: (401) Unauthorized #35

Closed rodrigomocca closed 6 years ago

rodrigomocca commented 7 years ago

Today I started receive The remote server returned an error: (401) Unauthorized error. My app is working since Cognitive Services was Project Oxford. Now I'm getting this, and I can't find where I must login to get a new apiKey.

Everything I found on internet redirect me to Azure. I've never signed up to Azure to do this. How do I fix this?

zhouwangzw commented 7 years ago

To access the REST end point, you must subscribe to Speech API which is part of Microsoft Cognitive Services (previously Project Oxford). After subscribing, you will have the necessary subscription keys to execute this operation. Both the primary and secondary keys can be used. For subscription and key management details, see Subscriptions.

rodrigomocca commented 7 years ago

But I already have this apiKeys, but now it doesn't work. Before I sign in without azure. Now I have to do it with Azure, but I don't have an azure account. So I've created one, but I don't see any cognitive services subscription. How I recover my account with my previously payment methods loaded?

And why my app has stopped working now? Why do you complicate things that much and with no notification?

I need to fix this right now, I have my system stopped because of this.


From: Zhou Wang notifications@github.com Sent: Wednesday, September 20, 2017 2:23:42 PM To: Azure-Samples/Cognitive-Speech-STT-Windows Cc: Rodrigo Mocca; Author Subject: Re: [Azure-Samples/Cognitive-Speech-STT-Windows] The remote server returned an error: (401) Unauthorized (#35)

To access the REST end point, you must subscribe to Speech API which is part of Microsoft Cognitive Services (previously Project Oxford). After subscribing, you will have the necessary subscription keys to execute this operation. Both the primary and secondary keys can be used. For subscription and key management details, see Subscriptionshttps://azure.microsoft.com/en-us/try/cognitive-services/.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/Cognitive-Speech-STT-Windows/issues/35#issuecomment-330921993, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD5gbBg7vsEiU1Yk0OBL2_sgZaxM2VROks5skUoegaJpZM4PeMwf.

zhouwangzw commented 7 years ago

@rodrigomocca Are you on a free tier or standard tier? If this is a free tier, does the usage exceedes the limit? More information can be found here

rodrigomocca commented 7 years ago

I don't know because I have not place to login and see my data.

Obtener Outlook para Androidhttps://aka.ms/ghei36


From: Zhou Wang notifications@github.com Sent: Thursday, September 21, 2017 2:49:37 AM To: Azure-Samples/Cognitive-Speech-STT-Windows Cc: Rodrigo Mocca; Mention Subject: Re: [Azure-Samples/Cognitive-Speech-STT-Windows] The remote server returned an error: (401) Unauthorized (#35)

@rodrigomoccahttps://github.com/rodrigomocca Are you on a free tier or standard tier? If this is a free tier, does the usage exceedes the limit? More information can be found herehttps://azure.microsoft.com/en-us/pricing/details/cognitive-services/speech-api/

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Azure-Samples/Cognitive-Speech-STT-Windows/issues/35#issuecomment-331057979, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AD5gbHlUQTra1SQeuXJZ38B9j3gfSS_Mks5skfjxgaJpZM4PeMwf.

zhouwangzw commented 7 years ago

@rodrigomocca I am afraid that your API key is not valid any more for whatever reason. Could you please try the following script in Powershell, after replacing YOUR_API_KEY with the key you are using:

$FetchTokenHeader = @{
'Content-type'='application/x-www-form-urlencoded';
'Content-Length'= '0';
'Ocp-Apim-Subscription-Key' = 'YOUR_API_KEY'
}

Invoke-RestMethod -Method POST -Uri https://api.cognitive.microsoft.com/sts/v1.0/issueToken -Headers $FetchTokenHeader

If you get an error, then your API key cannot be correctly authenticated. In this case, you may want to get a trial key using the link, and then try the script above again.

zhouwangzw commented 6 years ago

I am closing the issue due to lack of reponse. Please feel free to reopen a new one if you still have the problem. Thanks,