Microsoft Azure Face API - Face detect return values, but not return faceId

240 Views Asked by At

Microsoft Azure Face API - Face detect return object

{
    "faceRectangle": {
      "top": 114,
      "left": 206,
      "width": 167,
      "height": 167
    }
}

but I need faceId. It not return faceId. I did not fount solution about it.

enter image description here

1

There are 1 best solutions below

8
Venkatesan On BEST ANSWER

I tried in my environment and got the below results:

If you need to get the face Id of the image, you can use the below request.

In the request, you need to add returnFaceId =true to get the face Id.

Post https://your-azure-faceapi-endpoint.cognitiveservices.azure.com/face/v1.0/detect?returnFaceId =true
 { "url": "{Image Url here}" }
 Header:
 Ocp-Apim-Subscription-Key : "your-api-key"

Postman: enter image description here

Reference:

Face - Detect With Url - REST API (Azure Cognitive Services - Face) | Microsoft Learn