> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dizplai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fan identity

> How your signed-in fan reaches us, and what to do when a session fails.

Fans take part signed in with your login. They never sign in to Dizplai.

**On every vote and Fan Zone message,** send the fan's token from your login as `Authorization: Bearer <token>`, with your app's publishable key in `x-api-key`. We check the token against your login's settings, agreed when you're set up, and count the fan once per widget. Reads don't need it.

**Widgets that need a signed-in fan** have `requires_sign_in: true`. Show a fan who isn't signed in your sign-in prompt instead of the options.

## When a session fails

On a `401`, refresh the fan's token from your login and retry the call once. If it fails again, ask the fan to sign in again. Never retry a `403`.

| What happened | What you get | What to do |
| - | - | - |
| The fan's token is missing, invalid or expired | `401`, problem type `invalid-fan-token`, `WWW-Authenticate` | Refresh the token and retry once, then ask the fan to sign in |
| The widget needs a signed-in fan, the fan is blocked, or the token is from another client's login | `403` | Don't retry. Tell the fan they can't take part in this one |

## Consent

> [!NOTE]
>
> How you pass a fan's consent to us is being agreed. It will be described here.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.