Skip to main content
A subaccount is an OAuth client of its own, tied to one topic. Your service gets tokens with the client credentials flow, so it never needs your Link4Sync email or password, and you can revoke it at any time without touching anything else.
Use subaccounts for services and devices. They are also the way to use OAuth if you signed up with Google or Microsoft: those accounts have no Link4Sync password, so the password flow in HTTPS with OAuth does not apply to them.

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.
The client secret is shown only once and is not stored in the dashboard. Copy it into your secret store before you click I saved the secret.

Get a token

Store the three values as environment variables and request a token:
Tokens are short-lived. Request a new one when you get 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:
A successful publish returns 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.