Back to Knowledge Base
How to Create and Manage Device Tokens
What is a Device Token?
Section titled “What is a Device Token?”A Device Token is a credential that a physical machine or connected system uses to authenticate itself with CoCoCo. It is separate from user API Tokens — Device Tokens are tied to specific Devices, not to user accounts.
How to create a Device Token
Section titled “How to create a Device Token”- Go to Menu → IOT → Devices
- Open the Device you want to configure
- Go to the Tokens tab
- Click + Add Token
- Enter a Name (e.g.
Main credentialorProduction token) - Optionally set an Expiration date
- Click Create
- Copy the token immediately — it is not shown again after you leave the page
Using the token on your device
Section titled “Using the token on your device”Include the token in the Authorization header of every request the machine sends to CoCoCo:
Authorization: Bearer YOUR_DEVICE_TOKENFor MQTT connections, use the token as the password field in your MQTT client configuration.
How to revoke a token
Section titled “How to revoke a token”- Open the Device
- Go to the Tokens tab
- Click Revoke next to the token
- Confirm
The token stops working immediately.