Skip to main content
Rollout’s components act for one user of your CRM. Your server proves who that user is by signing a user token, a JWT, which your page fetches from your server and hands to the components. You’ll add two endpoints:

The token endpoints

Mint tokens on your server, for the user signed in to your session, never in the browser. The person claims describe one contact, so the apps component asks for a token per contact, and tells you which. The marketplace needs no person.
The contact id comes from the browser, so check that the user may see that contact before you sign a token for it.
Keep tokens short-lived. The components ask for a fresh one whenever they need it, so ten minutes is plenty.

Claims

Every id and value is a string. Leave out a key you have no value for rather than sending null, and send stage only with both its id and name. A claim of the wrong shape fails the whole token with INVALID_EMBED_CLAIMS, or INVALID_TOKEN_DATA for a sub that isn’t a string. Rollout ignores keys it doesn’t know in embed. Don’t send the person’s emails or phone numbers: no app receives them.

Signing

Sign the token with your client secret using HS256, HS384 or HS512. Rollout accepts any of your tenant’s active client secrets, so tokens keep working while you rotate one.

Token scopes

A token with any embed:* scope is accepted only by the embedded apps. The Universal API refuses it (403 EMBED_TOKEN_NOT_ACCEPTED), so a script on your page can’t use it to read or connect anyone’s accounts. If you also use the Universal API, mint separate tokens for it, without embed scopes.

Next

Show the apps on a contact, with the per-contact token.