Base URL
your-workspace with your AGO workspace name.
Authentication Modes
You can send both: a signed-in user’s JWT together with the device’s
X-User-Anon-Id.
Headers
Anonymous Mode
AGO creates one user perX-User-Anon-Id. Every request with the same ID reads and writes the same conversation history.
- Generate a random UUID once per installation and store it (
UserDefaultson iOS,SharedPreferenceson Android). - Send the same ID on every request and every app launch. A new ID means a new user with no history.
- Use a random value, not an account number or email. Anyone who sends the same ID sees the same conversations.
JWT Mode
Your backend issues a JWT after the user signs in to your app. AGO verifies its signature with the public keys published at your JWKS URL.Setup
- Publish your signing keys as a JWKS endpoint (for example
https://example.com/.well-known/jwks.json). - In AGO, go to Support → Settings → Your channels → Widget & SDK and enter it in JWT JWKS URL.
RS256, RS384, RS512 and ES256.
Claims AGO Reads
Other claims can be shown to your support team with JWT Fields Mapping on the same settings page, and can drive permission rules.
Errors
The SDK API returns401 when it cannot identify the user:
X-User-Anon-Idis missing and no valid JWT is sentX-User-Anon-Idcontains characters other than letters, digits,-and_, or is longer than 64 charactersOriginis sent and does not match your allowed domains
Implementation Examples
Swift (iOS)
Kotlin (Android)
Related
- Mobile Messaging - Send messages and stream answers
- Mobile Ticketing - Create support tickets
- Mobile SDK Examples - Complete client examples
- Widget Authentication - Allowed domains and JWT setup for the widget
