Skip to content

Cookie preferences

We use cookies for our own analytics, to see how our campaigns perform and, if you allow it, to load content from other services such as the Google site search. We never sell your data. Necessary cookies keep the site working and cannot be switched off. See our Cookie Policy for details and our Privacy Policy for how we handle personal data.

Security, load balancing and remembering your cookie choice.

Show us which pages people read, how they find the site and where they get stuck, so we can improve it (Google Analytics, Microsoft Clarity).

Show us which of our ad campaigns bring visitors to the site and remember the campaign or partner link you arrived from (Google Ads, LinkedIn, Meta, partner program). We do not use these cookies to build advertising profiles.

Load the site search from Google when you use it. Google sets its own cookies and shows ads in the search results.

© 2026 The ThingsBoard Authors
22.5k 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

Provisioning

Device Provisioning lets devices register themselves dynamically without being created manually in the ThingsBoard UI. For a full explanation, see Provisioning.

All provisioning requests are sent to a single endpoint — no access token is required:

POST https://thingsboard.cloud/api/v1/provision

The request body identifies the device and the provisioning profile configured in ThingsBoard.

ThingsBoard generates and returns an access token for the new device.

Request:

{
"deviceName": "DEVICE_NAME",
"provisionDeviceKey": "PUT_PROVISION_KEY_HERE",
"provisionDeviceSecret": "PUT_PROVISION_SECRET_HERE"
}
Terminal window
curl -s -X POST -H "Content-Type: application/json" -d '{"deviceName":"DEVICE_NAME","provisionDeviceKey":"PUT_PROVISION_KEY_HERE","provisionDeviceSecret":"PUT_PROVISION_SECRET_HERE"}' "http://thingsboard.cloud/api/v1/provision"

Response:

{
"status": "SUCCESS",
"credentialsType": "ACCESS_TOKEN",
"credentialsValue": "sLzc0gDAZPkGMzFVTyUY"
}

Use credentialsValue as the access token for subsequent HTTP API requests.

The device specifies its own access token during provisioning. ThingsBoard creates the device with the provided token.

Request:

{
"deviceName": "DEVICE_NAME",
"provisionDeviceKey": "PUT_PROVISION_KEY_HERE",
"provisionDeviceSecret": "PUT_PROVISION_SECRET_HERE",
"credentialsType": "ACCESS_TOKEN",
"token": "DEVICE_ACCESS_TOKEN"
}
Terminal window
curl -s -X POST -H "Content-Type: application/json" -d '{"deviceName":"DEVICE_NAME","provisionDeviceKey":"PUT_PROVISION_KEY_HERE","provisionDeviceSecret":"PUT_PROVISION_SECRET_HERE","credentialsType":"ACCESS_TOKEN","token":"DEVICE_ACCESS_TOKEN"}' "http://thingsboard.cloud/api/v1/provision"

Response:

{
"status": "SUCCESS",
"credentialsType": "ACCESS_TOKEN",
"credentialsValue": "DEVICE_ACCESS_TOKEN"
}
Field Required Description
deviceName No Name of the device to create. A name is auto-generated if omitted.
provisionDeviceKey Yes Provisioning key from the device profile in ThingsBoard.
provisionDeviceSecret Yes Provisioning secret associated with the key.
credentialsType No Set to ACCESS_TOKEN to specify a custom token.
token No The access token to assign when credentialsType is ACCESS_TOKEN.