Open Platform
Skip to content

Key authorization ​

https://euapi.ttlock.com/v3/key/authorize

Grant management rights of a lock to an ekey user,including rights of sending ekeys, creating passcodes,setting the lock, etc.

The user to be authorized must have an ekey,you can request cloud API: Send ekey to generate an ekey for that user。

If you want to cancel authorization of one user,refer to these two cloud APIs: Cancel key authorization, Delete the ekey.

1 Request example ​

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

javascript
curl --location -g --request POST 'https://euapi.ttlock.com/v3/key/authorize' \
--data-urlencode 'clientId=4773aa036f7f49c68d876bb4be85c80c' \
--data-urlencode 'accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f' \
--data-urlencode 'lockId=163377' \
--data-urlencode 'keyId=27619' \
--data-urlencode 'date=1625025703000'

2 Request parameters ​

NameTypeRequiredDescription
clientIdStringYclient_id from Create application
accessTokenStringYAccess token,refer to: Get access token
lockIdIntYLock ID, generated by Lock init
keyIdIntYekey ID
dateLongYCurrent time (timestamp in millisecond)

3 Response and example ​

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