Open Platform
Skip to content

Query unlock method user attributes ​

https://euapi.ttlock.com/v3/lock/getOpenTypeAttribute

Query the "allow opening the privacy lock (openPrivacyLock)" attribute of an unlock method. If it has not been set, 0 (disabled) is returned by default.

The open platform currently only supports querying unlock methods of IC card (openType=2) and keypad password (openType=6). Passing other unlock methods will return error code -4043.

1 HTTP request method and example ​

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

javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/lock/getOpenTypeAttribute' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=3001' \
--data-urlencode 'openType=6' \
--data-urlencode 'openTypeId=123456' \
--data-urlencode 'date=1626945087000'

2 Request parameters ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID
openTypeIntYUnlock method type: 2-IC card, 6-keypad password (the open platform currently only supports these two; other values return error code -4043)
openTypeIdIntYUnlock method ID: when openType=6, it is the keyboardPwdId returned by the Passcode list API; when openType=2, it is the cardId returned by the IC card list API
dateLongYCurrent time (timestamp in millisecond)

3 Response and example ​

ParameterTypeDescription
openPrivacyLockIntAllow opening the privacy lock: 1-allowed, 0-not allowed (default)
{
     "openPrivacyLock": 1
}
CopyRight © 2012-2026 TTLock.All Rights Reserved