Modify unauthorized alarm information
https://euapi.ttlock.com/v3/lock/updateUnauthorizedAttemptAlert
Configure unauthorized alarm messages.
Once this function is enabled, the smart lock will immediately lock if the number of unauthorized unlocking attempts reaches a specified number.
The lock's characteristic value of 93 indicates that the unauthorized alarm function is supported.
1 Request example
POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/lock/updateUnauthorizedAttemptAlert' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'type=1' \
--data-urlencode 'lockId=3001' \
--data-urlencode 'unauthorizedAttemptAlertFlag=1' \
--data-urlencode 'unauthorizedAttemptAlertCount=4' \
--data-urlencode 'unauthorizedAttemptAlertLockTime=60' \2 Request parameters
| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | Client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| type | Int | Y | 1- Update via Bluetooth; 2- Update via gateway or Wi-Fi lock |
| lockId | String | Y | Lock ID |
| unauthorizedAttemptAlertFlag | Int | Y | Unauthorized alarm, 1 - On, 0 - Off |
| unauthorizedAttemptAlertCount | Int | Y | Unauthorized alerts, number of failures, 0 indicates off. |
| unauthorizedAttemptAlertLockTime | Int | Y | Unauthorized alarm, lock time, unit - seconds |
| unauthorizedAttemptAlertPwd | Int | N | Unauthorized alarm, password flag: 1 - on, 0 - off |
| unauthorizedAttemptAlertCard | Int | N | Unauthorized alarm, IC card flag: 1 - On, 0 - Off |
| unauthorizedAttemptAlertFingerprint | Int | N | Unauthorized access alarm, fingerprint indicator, 1 - open, 0 - closed |
| date | Long | Y | Current time (timestamp, in milliseconds) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
| description | String | Error Description |
{
"errcode": 0,
"errmsg": "none error message",
"description":"表示成功或是"
}