Please reach out to support@embedreach.com to
get a Shared Secret for your platform in order to generate JWT tokens.
If your app enforces security headers like Content Security Policy (CSP) or Cross-Origin Opener Policy (COOP), see Security Headers (CSP & COOP) for required configurations.
Tenant Scoped JWT Token Requirements
Sign your tenant-scoped token with your Shared Secret usingHS256. It must include the following fields:
Identifying the End User
externalId is how Reach tells your users apart. Each externalId becomes a distinct user under that tenant, so activity in the embedded UI can be attributed to a person rather than to the business as a whole.
For that to work, externalId must be:
- A string. If your user IDs are numbers, convert them:
String(user.id). - Stable. Send the same value every time you mint a token for that person.
- Unique within the tenant. Two people in the same business must never share one.
email and name are recorded the first time Reach sees a given
externalId, and are not updated by later tokens.externalId sent with two different tenantExternalId values is two separate users, and no user identity is shared across tenants.
Reach stores the externalId, email, and name you send for each user.