Identify your users
Everyone who chats through an app is an end user of that app. Their conversations are theirs: one user never sees another’s. Snipet doesn’t keep its own accounts for them; it trusts the app to say who they are.
Two ways in
Section titled “Two ways in”Anonymous users. Visitors chat without signing in. The widget creates a user per browser and keeps it, so a returning visitor gets their chats back. Good for public help on a marketing site. See anonymous users.
Your users. Your backend vouches for the signed-in user by issuing a token with the app’s API key. The user keeps the same conversations on any device. Good for anything behind a login.
How tokens work
Section titled “How tokens work”Browser ──▶ your backend ──▶ POST /api/apps/issue-token (X-API-Key: app key) ▲ │ └── token ◀─────┘ │ └──▶ Snipet widget or your own UI (Authorization: Bearer <token>)- Your user signs in to your product as usual.
- Your frontend asks your backend for a Snipet token.
- Your backend calls Snipet with the app’s API key and the user’s id, and returns the token. See issue tokens.
- Your frontend hands the token to the widget, or uses it to call the API directly. See use the token and build your own UI.