Add Face Image

Last Updated on : 2023-06-15 05:28:47

Add a face image based on the device ID and face ID.

API address

POST: /v1.0/cameras/{device_id}/configs/face/{face_id}

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.
face_idStringuritrueThe face ID.

Description of body

Parameter nameTypeINRequiredDescription
user_nameString trueThe name.
face_id_urlString trueThe URL of a specified face image.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe ID of a specified command record.

Request example

POST: /v1.0/cameras/6ce****/configs/face/123****
{
  "user_name": "James",
  "face_id_url": "http://img.jpg"
}

Return example

{
    "result": {
        "sn": "133****"
    },
    "t": 1561456817168,
    "success": true
}

Error code

For more information, see error code.