Skip to main content
Identity verification proves to Argide who the user is, so the agent can call your API as that user — “show my orders”, “cancel my subscription”. Your backend mints a JWT, the widget passes it to Argide, and Argide forwards it to your API on every tool call.
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

  1. User logs into your app
  2. Your backend mints an Argide identity token (JWT signed with your Argide secret)
  3. Your frontend calls window.argide('identify', { token })
  4. When the agent calls your API, Argide sends that token as Authorization: Bearer <token>
  5. 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:
Never expose this secret in frontend code.

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

Identify on every page load, not just after login — each new browser session needs the token.

Keep the Token Fresh

Tokens expire, so you need to make sure the token sent to Argide is kept fresh. Re-mint before exp 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.
  1. Open your product’s API integration and select JWT Forward as the auth type
  2. Verify the token in your API with the same ARGIDE_AUTH_SECRET
See OpenAPI Authentication for the spec and the verification middleware.
Without JWT Forward configured, identify succeeds silently and stores nothing. This is the most common reason identity appears to do nothing.

5. Handle Logout

This revokes the token you passed and starts a fresh, anonymous session. Call it yourself on logout — the widget does not do it for you when your app signs the user out.

Next Steps

OpenAPI Authentication

Configure JWT Forward and verify the token

User Identification

Name your users without a backend