Lock init

https://api.sciener.com/v3/lock/initialize

Alert:Call this api after calling APP SDK method to add a lock, lockData must be get from the callback function of Lock initialie method of APP SDK.

This API will initialize the lock in the cloud server,and will generate an admin ekey for the user.

If the lock is successfully added in Sciener APP,it is already initialized, there is no need to request this API. Just request cloud API: Get the lock list of an account to get the lock. You can also get lockId in Sciener APP 's lock basics page (Settings->Basics),as shown in screenshot below:

image-20211018144743022

1 Request example

POST, ContentType:application/x-www-form-urlencoded

2 Request parameters

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockDataStringYLock Data,must be get from the callback function of Lock initialie method of APP SDK
lockAliasStringNLock alias
groupIdIntNgroup ID,refer to cloud API: Add group
nbInitSuccessIntNIs NB-IoT lock inited Successfully? 1-yes, 0-no. Only NB-IoT lock need this parameter.
dateLongYCurrent time (timestamp in millisecond)

3 Response and example

ParameterTypeDescription
lockIdIntLock ID
keyIdIntAdmin ekey id