Open Platform
Skip to content

Get the gateway list of a lock ​

https://euapi.ttlock.com/v3/gateway/listByLock

The gateway automatically search locks nearby it, and notify the gateway server about the locks it found, the gateway server will create a many-to-many relationship between the gateways and locks if the lock and gateway belong to the same administrator account, the relationship will be cached for 30 minutes, that is if a gateway have notified the gateway server about the lock in 30 minutes, this API will return the gateway.

This API will return all the gateways related to a lock.

The gateway server will choose the gateway with the best RSSI to communication with the lock when user want to operate the lock remotely.

1 Request example ​

javascript
curl --location --request GET 'https://euapi.ttlock.com/v3/gateway/listByLock?clientId=4773aa036f7f49c68d876bb4be85c80c&accessToken=dfd5489d0cee31f0bdfaf59d0d42d71f&lockId=163377&date=1626674054000'

2 Request parameters ​

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

3 Response and example ​

ParameterTypeDescription
listJSONArraylist of records

The objects in the list:

ParameterTypeDescription
gatewayIdIntGateway ID
gatewayMacStringGateway MAC
gatewayNameStringGateway name
rssiIntThe signal intensity between gateway and lock. reference: >-75 is strong, -85<i<-75 is medium, <-85 is weak
rssiUpdateDateLongThe time when the signal intensity updated (timestamp in millisecond)
{
    "list": [
        {
            "gatewayId": 78979,
            "gatewayMac": "C5:40:E0:9C:8C:C1",
            "gatewayName": "Gateway for 1-101",
            "rssi": -65,
            "rssiUpdateDate": 1626674053000
        }
    ]
}
CopyRight © 2012-2026 TTLock.All Rights Reserved