Open Platform
Skip to content

Upload valid passcode from lock ​

https://cnapi.sciener.com/v3/keyboardPwd/uploadValidCodeFromLock

After use SDK method to Get all valid passcodes in lock, You can upload those data to the cloud via this API

Upload valid passwords read by the SDK, if they do not exist in the cloud, they will be recorded in the cloud; if passwords not read by the SDK exist in the cloud, they will be recorded as invalidated passwords

1 Request example ​

POST, ContentType:application/x-www-form-urlencoded
javascript
curl --location -g --request POST 'https://cnapi.sciener.com/v3/keyboardPwd/uploadValidCodeFromLock' \
--data-urlencode 'clientId=fd2ff35ee3xxxxxx' \
--data-urlencode 'accessToken=780f7671b6e6bxxxxxxx' \
--data-urlencode 'lockId=24451' \
--data-urlencode 'keyboardPwdList=[{"cycleType":0,"endDate":0,"keyboardPwd":"147362","keyboardPwdType":2,"newKeyboardPwd":"147369","startDate":946656000730},{"cycleType":0,"endDate":0,"keyboardPwd":"771108","keyboardPwdType":2,"newKeyboardPwd":"771108","startDate":946656000821},{"cycleType":0,"endDate":0,"keyboardPwd":"458698","keyboardPwdType":2,"newKeyboardPwd":"458698","startDate":946656000913}]' \
--data-urlencode 'date=1626945087000'

2 Request parameters ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
keyboardPwdListStringYFrom APP SDK method Get all valid passcodes in lock
dateLongYCurrent time (timestamp in millisecond)

3 Response and example ​

ParameterTypeDescription
errcodeIntError code
errmsgStringError message
{
    "errcode": 0, 
    "errmsg": "none error message"}
CopyRight © 2012-2026 Sciener.All Rights Reserved