Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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"}'

like image 864
ZyadOmer999 Avatar asked Dec 18 '25 10:12

ZyadOmer999


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

like image 165
Stanley Gong Avatar answered Dec 21 '25 06:12

Stanley Gong



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!