Resource Not Found Error Face API

In this Azure tutorial, we will see how to fix the error “ Resource Not Found Error Face API “ that I got while testing my Face API output using the Postman tool.

Resource Not Found Error Face API

Recently, After the configuration of the Face API, I was trying to test that using the Postman tool. I got the error “Resource not found“. I have verified the Key and Endpoint URL. Even, I have regenerated the key and was trying to use the new one.

You can able to see, the key1 and Endpoint URL of my Azure Face API as below

Resource not found error Face API
  • Key1: 191d05e8fxxxxxx81c2a4cb4fc9373
  • ENDPOINT URL: https://demofaceapi.cognitiveservices.azure.com/
  • Location: eastus

Image URL: The below was my image URL which has public access and it is in JSON format

{

"url":"https://her33fffff.blob.core.windows.net/new123/nwphoto.png"

}

Resource Not Found Postman Face API Testing

Now, in the Postman tool, I have provided all the above correct values, You can check it below

Resource Not Found for end point url

Here is the body, where I have provided the image URL in JSON format as below

Resource Not Found error for end point url Face API

Now when I clicked on the Send button, I got the error Resource Not Found. You can see it as below

Resource Not Found Face API error

When I tried finding out the solution, I came to know that we need to append the /detect with the ENDPOINT URL. I have tried appending the /detect with my Azure Face API endpoint URL. Now my URL becomes

https://demofaceapi.cognitiveservices.azure.com/detect

So when I tried with the above URL, again I was end up with the same error. you can see below

Azure Face API error Resource not found

The exact error message was as below

{
    "error": {
        "code": "404",
        "message": "Resource not found"
    }
}

Resource Not Found Error Face API [Solved]

I have tried finding out the solution and came to know that the Problem is total with the Azure Face API Endpoint URL. The URL that was showing for my Azure Face API was as below

https://demofaceapi.cognitiveservices.azure.com/detect

When I was trying to find out the solution I came to know, use the Face API Endpoint URL looks like below

https://westus.api.cognitive.microsoft.com/face/v1.0/detect

So, this URL is formed based on the Region that you have selected while creating the Azure Face API and the version number. So in my case for me the Region was eastus. So the endpoint URL will be as below

https://eastus.api.cognitive.microsoft.com/face/v1.0/detect

Now I have used the Key1 value for my Azure Face API as it and then as the Endpoint URL, I have used the above URL. All other configuration values remain as it is.

Note: The Azure Face API Endpoint URL should be Proper, Key-value should be correct one and then make sure to append the /detect along with the Azure Face API endpoint URL.

Now you can able to see, I got the expected output with the Proper response code as below

404 Resource not found error Azure Face API

Below is the complete Output

[
    {
        "faceId": "e912a94d-2c85-45c5-ae28-38b09986369d",
        "faceRectangle": {
            "top": 549,
            "left": 583,
            "width": 119,
            "height": 119
        }
    },
    {
        "faceId": "5dc9c35f-1ef2-472c-9d07-5825409710f3",
        "faceRectangle": {
            "top": 95,
            "left": 212,
            "width": 95,
            "height": 95
        }
    },
    {
        "faceId": "a672bcb2-f970-4a6b-92db-308dd640fcfd",
        "faceRectangle": {
            "top": 312,
            "left": 109,
            "width": 76,
            "height": 76
        }
    },
    {
        "faceId": "0c1d65dd-0717-4cfb-a461-df2dbd953d7d",
        "faceRectangle": {
            "top": 87,
            "left": 658,
            "width": 66,
            "height": 66
        }
    }
]

This is how you can able to fix the error Resource Not Found Error Face API.

You may also like following the below articles

Wrapping Up

Well, In this article, we have discussed how to fix Resource Not Found Error Face API or Azure Face API Resource not Found Error, Resource Not Found Postman Face API Testing. Hope it will help you to fix your issue as well !!!

Leave a Comment