Hi @Ali MTW
Thank you for using the Microsoft Q&A forum.
Regarding your error while using the REST API URL, I tried to repro your issue using POSTMAN tool. Kindly issue the POST request in the postman to the OCR API Azure Cognitive Services Endpoint. Once the POST request was done in the Postman, we can check the results. Please also provide the API key, content type etc in the POST request and click on "SEND" button in postman. Give the below values in POST request Header. In Body select the binary option and browse for the image file. see the below screenshot, in which the POST request was successful from my side.
To fix the "401 Unauthorized" error when accessing the OCR API of Azure Cognitive Services, you need to provide valid credentials, ensure the subscription key is correctly provided in the request header, verify you have the necessary permissions, and check if the endpoint URL is correctly configured. To ensure you have necessary roles (Cognitive Services OCR Contributor or owner role) etc., please "Run" a test from the studio itself.
If the issue persists, please raise a support request through Azure portal for further assistance.
I hope you understand! Thank you.
Please do not forget to click Accept Answer
and Yes
for was this answer helpful, wherever the information provided helps you. This can be beneficial to other community members.