Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unauthorized when calling Cognitive Service API #15

Closed
jwood803 opened this issue May 16, 2018 · 2 comments
Closed

Unauthorized when calling Cognitive Service API #15

jwood803 opened this issue May 16, 2018 · 2 comments
Labels

Comments

@jwood803
Copy link

Created a Computer Vision project with the VS Tools for AI extension after creating the service in the Azure Portal. Putting the API key and (I assume) the correct location, I'm still getting an unauthorized exception. I even copied both keys from the AI Tools section of the Server window and still get this error. Am I setting something wrong?

image

@linmajia
Copy link
Contributor

linmajia commented May 24, 2018

@jwood803 , thank you very much for the feedback.

This is a known issue in the Computer Vision application template. Please open ComputerVisionApiExtensions.cs, and add the following line of code in ComputerVisionApiExtensions class's constructor:

this.AzureRegion = GetRegion(region);

Please refer to this screenshot:

image

@jwood803
Copy link
Author

Thanks, @linmajia! Just tried that and all is now working!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants