- A user identifier sent in the
X-User-Anon-Idheader. The widget generates it in the visitor’s browser and keeps it inlocalStorageunderago-widget-id, so a returning visitor keeps their conversations. It must be 1 to 64 characters long and contain only letters, digits,-and_(a UUID works).X-Widget-Idis still accepted as the former name of this header. - The website’s origin, checked against your allowed domains list.
- An optional JWT issued by your application, to identify logged-in users.
Configure the widget
Go to Support > Settings > Your channels > Widget & SDK, then fill in Widget Configuration:
Anonymous and logged-in users can get different permissions. Set the defaults for each in Agents > Permissions. See Agent Permissions.
Anonymous users
Anonymous access needs no extra setup: embed the widget and each visitor gets their own identifier.basepath for your workspace from the integration examples on the Widget & SDK page.
Logged-in users (JWT)
To identify users who are logged in to your application, issue a JWT for them and pass it to the widget:Authorization: Bearer <token> header of every request. When the token changes, for example after a refresh or a login, call sendJwtToAGO(token). See Widget Metadata Communication.

Authentication Flow with JWT
Token requirements
- Sign the token with RS256, RS384, RS512 or ES256, using a key published at your JWKS URL.
- Set an
expclaim to limit the token’s lifetime. AGO rejects expired tokens. - AGO reads these claims when present:
Other claims are kept on the user, so you can show them with JWT Fields Mapping or use them in access control rules.
If AGO can’t verify the token (wrong signing key, expired, or no JWKS URL configured), the user is treated as anonymous.
Request headers
The widget sets these headers for you. If you call the SDK API directly, send them yourself:X-User-Anon-Id header becomes optional and AGO uses the token’s sub claim as the user’s identity.
Troubleshooting
The widget doesn’t load or returns “Not authorized”- Check that your website’s domain is in Allowed Domains.
- Check that the
X-User-Anon-Idheader is present and only contains letters, digits,-and_, or that a JWT is sent on the SDK API.
- Check that the JWT JWKS URL is set and reachable from the internet.
- Check that the token is signed with a key published at that URL and with a supported algorithm.
- Check that the token hasn’t expired.
