If you only want the user’s name on their conversations, you don’t need any of this. See User Identification — it needs no backend and no token.
How It Works
- User logs into your app
- Your backend mints an Argide identity token (JWT signed with your Argide secret)
- Your frontend calls
window.argide('identify', { token }) - When the agent calls your API, Argide sends that token as
Authorization: Bearer <token> - Your API verifies it with the same secret and knows which user is asking
This is not your app’s session JWT. It’s a separate Argide-scoped identity token that your backend mints specifically for Argide. Your app JWT stays private.
1. Get Your Secret
Go to dashboard.argide.ai/dashboard/deploy/widget → copy Verification Secret. Add to your backend environment:2. Create Backend Endpoint
JWT Payload
Sign the token with
HS256. The exp claim is required — Argide rejects a token without one. The user identifier can be sent as sub, userId, or user_id; Argide takes the first one it finds, in that order.
3. Identify in Frontend
Keep the Token Fresh
Tokens expire, so you need to make sure the token sent to Argide is kept fresh. Re-mint beforeexp passes, or Argide has no valid token to forward and your API returns 401. With a one-hour token, refresh every 50 minutes.
4. Enable JWT Forward
Turn on JWT Forward, or the token you pass is ignored.- Open your product’s API integration and select JWT Forward as the auth type
- Verify the token in your API with the same
ARGIDE_AUTH_SECRET
5. Handle Logout
Next Steps
OpenAPI Authentication
Configure JWT Forward and verify the token
User Identification
Name your users without a backend
