Skip to content
Stand with Ukraine flag

Claiming

Device Claiming lets an end user securely associate a deployed device with their account. For a full explanation of the claiming workflow, see Claiming Devices.

See Getting Connected for credential types and connection details.

The device initiates claiming by sending a POST request:

Credential typeURL
Access Tokencoap(s)://coap.eu.thingsboard.cloud:5683/api/v1/$ACCESS_TOKEN/claim
X.509 Certificatecoaps://coap.eu.thingsboard.cloud/api/v1/claim
{"secretKey": "mySecret", "durationMs": 60000}

Access Token:

Terminal window
coap-client -v 6 -m POST -t "application/json" -e '{"secretKey":"mySecret","durationMs":60000}' "coap://coap.eu.thingsboard.cloud:5683/api/v1/$ACCESS_TOKEN/claim"

X.509 Certificate:

Terminal window
coap-client-openssl -v 6 -c cert.pem -j key.pem -m POST -t "application/json" -e '{"secretKey":"mySecret","durationMs":60000}' "coaps://coap.eu.thingsboard.cloud/api/v1/claim"
FieldRequiredDescription
secretKeyNoSecret used to authorize the claim. Defaults to an empty string if omitted.
durationMsNoTime window in milliseconds during which the device can be claimed. Defaults to the system value of SECURITY_CLAIM_DURATION.

When the device profile payload type is set to Protobuf, encode the payload using the same fixed schema as MQTT. See MQTT Claiming for the Protobuf schema.

Once the claiming window is open, the end user enters the secret key in the ThingsBoard UI to complete the association.