Register NB-IoT Lock
https://euapi.ttlock.com/v3/lock/registerNb
Register NB-IoT Device to NB-IoT Cloud Server.
Normally, this will be done in request cloud API: Init lock,you do not need to request this API.
In case of register failure or replacement of the NB card or module, you can request this API.
1 Request example
POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/lock/registerNb' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--data-urlencode 'nbNodeId=866000054718659' \
--data-urlencode 'nbCardNumber=460223126347331' \
--data-urlencode 'nbOperator=46011' \
--data-urlencode 'nbRssi=12' \
--data-urlencode 'date=1625025703000'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 |
| lockId | Int | Y | Lock ID, generated by Lock init |
| nbNodeId | String | Y | NB-IoT node id |
| nbCardNumber | String | Y | NB-IoT card number |
| nbOperator | String | Y | NB-IoT operator:46011-China Telecom、46000-China mobile、21401-Vodafone、50212-Maxis |
| nbRssi | Int | Y | NB RSSI, reference: >20 is strong, 10<i<20 is medium, <-10 is weak |
| date | Long | Y | Current time (timestamp in millisecond) |
3 Response and example
| Parameter | Type | Description |
|---|---|---|
| errcode | Int | Error code |
| errmsg | String | Error message |
{
"errcode": 0,
"errmsg": "none error message"
}