修改未授权报警信息
https://euapi.ttlock.com/v3/lock/updateUnauthorizedAttemptAlert
设置未授权报警信息。
功能开启后,若开锁失败次数达到指定次数,智能锁将马上锁定。
锁的特征值93,表示支持未授权报警功能。
1 HTTP请求方法及示例
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 参数说明
| 名称 | 类型 | 是否必需 | 描述 |
|---|---|---|---|
| clientId | String | Y | 创建应用分配的client_id |
| accessToken | String | Y | 访问令牌,通过获取访问令牌接口获取 |
| type | Int | Y | 1-蓝牙方式更新,2-通过网关或者WIFI锁 |
| lockId | String | Y | 锁ID |
| unauthorizedAttemptAlertFlag | Int | Y | 未授权报警,1-打开,0-关闭 |
| unauthorizedAttemptAlertCount | Int | Y | 未授权报警,失败次数,0表示关闭 |
| unauthorizedAttemptAlertLockTime | Int | Y | 未授权报警,锁定时间,单位-秒 |
| unauthorizedAttemptAlertPwd | Int | N | 未授权报警,密码标志位,1-打开,0-关闭 |
| unauthorizedAttemptAlertCard | Int | N | 未授权报警,IC卡标志位,1-打开,0-关闭 |
| unauthorizedAttemptAlertFingerprint | Int | N | 未授权报警,指纹标志位,1-打开,0-关闭 |
| date | Long | Y | 当前时间(时间戳,单位毫秒) |
3 返回参数及示例
| 参数 | 类型 | 描述 |
|---|---|---|
| errcode | Int | 错误码 |
| errmsg | String | 错误信息 |
| description | String | 错误描述 |
{
"errcode": 0,
"errmsg": "none error message",
"description":"表示成功或是"
}