401 error when retrieving results from the Vision API.

sally,han 0 Reputation points
2023-03-22T19:37:43.66+00:00

We ran a test to extract text from an image with the Vision API. After the test, when I try to search the URL passed to Operation-Location, I get the following error.

< HTTP/2 401

< content-length: 224

< content-type: application/json

< apim-request-id: ab646acc-0bd2-4fb0-a0fe-72b077791855

< date: Wed, 22 Mar 2023 19:37:11 GMT

<

* Connection #0 to host koreacentral.api.cognitive.microsoft.com left intact

{"error":{"code":"401","message":"Access denied due to invalid subscription key or wrong API endpoint. Make sure to provide a valid key for an active subscription and use a correct regional API endpoint for your resource."}}%

I copied and used the key and endpoint values from the Vision API resource, and selected the region as koreacentral, and ran the test like below, but the result is the same.

I also tried changing the endpoint to koreacentral.api.cognitive.microsoft.com as per the guide you gave me in chat, but I got the same result, and I also tried the delete-regenerate test on the Vision API resource, but the result is the same.

POST https://[my domain].cognitiveservices.azure.com/vision/v3.2/read/analyze?language=en&model-version=latestOpens in a new window; external. HTTP/1.1

Host: [my domain].cognitiveservices.azure.comOpens in a new window; external.

Content-Type: application/json

Ocp-Apim-Subscription-Key: --------------------------------

Ocp-Apim-Subscription-Region: koreacentral

{"url":[image url info]}

How can I get the results back normally? It's so frustrating.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
311 questions
{count} votes