Roles
Create a subaccount
1
Open the OAuth tab
On the topic card, open Endpoints and credentials, choose HTTPS, MQTT, or MQTTS, and set Authentication method to OAuth. The Subaccounts section lists the topic’s existing subaccounts.
2
Pick a role
Choose Consumer (reads) or Producer (writes to …). For a consumer, tick the topics under Also read from. Only topics you already allowed in Read access appear there.
3
Create it and copy the secret
Click Create subaccount. The card shows the Client ID, Client secret, and Token endpoint.
Get a token
Store the three values as environment variables and request a token:401.
Read with a consumer subaccount
Connect over MQTT with the topic ID as the username and the token as the password, then subscribe to<topic ID>/out. See Read messages.
Publish with a producer subaccount
Over MQTT, use the token as the password, see Publish over MQTT. Over HTTPS, send it as a bearer token, exactly as in HTTPS with OAuth:202 Accepted.
Delete a subaccount
Click the trash icon next to the subaccount and confirm. Its client stops working immediately, tokens it already received stop working too, and it cannot be restored. Create a new subaccount if you need access again.Limits
- A consumer subaccount can read at most 25 topics: its own topic plus up to 24 others.
- A producer subaccount cannot be given other topics.
- You can only grant topics that belong to your account.