question

ManmohanSinghMeda-1161 avatar image
0 Votes"
ManmohanSinghMeda-1161 asked ManmohanSinghMeda-1161 commented

Geeting API 401 permissions denied error while running API request from postman

Below is the error.

"{
"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."
}
}"

partner-center-api
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

kaml avatar image
0 Votes"
kaml answered ManmohanSinghMeda-1161 commented

Your API is protected by authn and authz.

Do you have a swagger page on your API? Do you need to log in to access the API? Or some sort of API key? Or both?

In Postman you need to configure this in the "Authorization" tab.

I would need more information before being able to assist on that one

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Below is the API call I am running from postman.
"https://centralindia.api.cognitive.microsoft.com/vision/v2.0/analyze?visualFeatures=Categories&language=en HTTP/1.1
Host: westus.api.cognitive.microsoft.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: **"

Not sure what to configure un Authorization tab.

Thank you for your quick response.

0 Votes 0 ·