https://api.sciener.com/v3/keyboardPwd/change
There are two methods to change the passcode:
You can develop your own APP based on our APP SDK,call Modify Keyboard Password method to change the passcode in the lock,then request this API ( with changeType=1) to sync it to cloud.
If the lock is WiFi lock or it's connected to a gateway, you can change the passcode remotely,just request this API ( with changeType=2) .
With this API, you can change the name, valid period or passcode itself.
When you want to change passcode name, only keyboardPwdName parameter is needed, changeType is noot needed;
When changing valid period startDate and endDate parameters are required;
When changing passcodenewKeyboardPwd parameter is required.
xxxxxxxxxxPOST, ContentType:application/x-www-form-urlencoded
xxxxxxxxxxcurl --location -g --request POST 'https://api.sciener.com/v3/keyboardPwd/change' \--data-urlencode 'clientId=fd2ff35ee3xxxxxx' \--data-urlencode 'accessToken=780f7671b6e6bxxxxxxx' \--data-urlencode 'lockId=24451' \--data-urlencode 'keyboardPwdId=123456' \--data-urlencode 'keyboardPwdName=Passcode for Tony' \--data-urlencode 'newKeyboardPwd=689768' \--data-urlencode 'startDate=1626945087000' \--data-urlencode 'endDate=1846945087000' \--data-urlencode 'changeType=2' \--data-urlencode 'date=1626945087000'| Name | Type | Required | Description |
|---|---|---|---|
| clientId | String | Y | client_id from Create application |
| accessToken | String | Y | Access token,refer to: Get access token |
| lockId | Int | Y | Lock ID, generated by Lock init |
| keyboardPwdId | Int | Y | Passcode ID |
| keyboardPwdName | String | N | New passcode name |
| newKeyboardPwd | String | N | The new passcode |
| startDate | Long | N | The start time of the new passcode (timestamp in millisecond) |
| endDate | Long | N | The end time of the new passcode (timestamp in millisecond) |
| changeType | Int | Y | Method: 1-via phone bluetooth, you should call APP SDK method first 2- via gateway or WiFi lock, you can call this api directly if it's a WiFi lock or it's connected to gateway The default value is 1. |
| date | Long | Y | Current time (timestamp in millisecond) |
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
xxxxxxxxxx{"errcode": 0,"errmsg": "none error message"}