Sync Device Time

Last Updated on : 2023-06-20 14:54:10

The cloud service sends a command of synchronizing the time to a specified access control device. After receiving the command, the access control device synchronizes its time with the cloud service.

API address

POST: /v1.0/access-control/{device_id}/actions/synctime

Request parameter

Parameter nameTypeINRequiredDescription
device_idStringuritrueThe ID of a Tuya device.

Description of body

Parameter nameTypeINRequiredDescription
timestampLong trueThe timestamp.

Return parameter

Parameter nameTypeDescription
resultCmdIssueResultResponseThe returned result.

Description of result

Parameter nameTypeDescription
snStringThe command record ID.

Request example

POST: /v1.0/access-control/6ce****/actions/synctime
{
  "timestamp": 1582959882104
}

Return example

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

Error code

For more information, see error code.