Personal Access Tokens
Create, list, and revoke the personal access tokens that authenticate Blue API requests.
Personal access tokens (PATs) are the programmatic credentials behind Blue’s API authentication. This section is the API-reference complement to the UI walkthrough in Getting Started > Authentication: it documents how to create, list, and revoke tokens via GraphQL.
A token has two parts:
- Token ID — the unprefixed
uid, sent as theX-Bloo-Token-IDheader. - Secret — the
pat_-prefixed value, sent as theX-Bloo-Token-Secretheader.
The Secret is shown exactly once, at creation. Blue stores only a bcrypt hash of it, so it can never be retrieved again — capture it when the create mutation returns it.
All three operations require an authenticated user session (the Firebase/JWT login used by the app). They cannot be performed while authenticating with a token itself — calling them with X-Bloo-Token-ID headers present returns FORBIDDEN. Generate, audit, and revoke tokens from a logged-in browser session, not from an API integration.
In the API, a token is a PersonalAccessToken object. The list query returns a PersonalAccessTokenPagination wrapper (items + pageInfo). Tokens are always scoped to the calling user — you only ever see and manage your own.
Operations
| Operation | Type | Description |
|---|---|---|
| Create a Token | Mutation | createPersonalAccessToken — generate a token and read its Secret (the only time it’s returned). |
| List Tokens | Query | personalAccessTokens — page through your own tokens to audit names, expiry, and last-used dates. |
| Revoke a Token | Mutation | deletePersonalAccessToken — delete a token by ID; it stops authenticating immediately. |
Related
- Authentication — the in-app flow for generating a token and the
X-Bloo-*request headers. - Making Requests — how to send authenticated GraphQL requests with curl, Python, or Node.