Skip to content
Try for free

ThingsBoard Cloud

Choose your data region

Your data stays in the region you choose, for residency and compliance. No credit card required.

Rather run it yourself? Install on your own servers

Claiming

Initiate the claiming process for one or more downstream devices simultaneously.

Topic: v1/gateway/claim

{
"Device A": {"secretKey": "secretA", "durationMs": 60000},
"Device B": {"secretKey": "secretB", "durationMs": 60000}
}
Field Required Description
secretKey No Secret key for claiming authorization. Defaults to an empty string.
durationMs No Claiming window in milliseconds. Defaults to the system value of SECURITY_CLAIM_DURATION.

Replace GATEWAY_DEVICE_ACCESS_TOKEN in the command below with the gateway device’s access token, and $THINGSBOARD_HOST with your ThingsBoard instance’s host.

Terminal window
mosquitto_pub -h "$THINGSBOARD_HOST" -t "v1/gateway/claim" -u "GATEWAY_DEVICE_ACCESS_TOKEN" -m '{"Device A":{"secretKey":"mySecret","durationMs":60000}}'

For a full explanation of the claiming workflow, see Claiming Devices.