Azure "Unauthorized. Access token is missing, invalid, audience is incorrect or have expired"

Viewed 716

I have a token with computer vision included in the scope and audience. But when a send an OCR request it always returns "Unauthorized. Access token is missing, invalid, audience is incorrect or have expired". What is wrong with my code?

curl --location --request POST 'https://westeurope.api.cognitive.microsoft.com/vision/v3.0/ocr'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer myToken'
--data-raw '{"url":"imageUrl"}'

1 Answers

Pls just try the request below to get an access token from Azure AD for the vision OCR service:

enter image description here

Related