Overview
Authentication
How to authenticate with the Toku API using personal API tokens
This is the v1 (legacy) token API. The current Toku API is documented in the API reference.
Personal API tokens can no longer be created. For new integrations, use an organization API key. The API key guide shows where eligible admins can create one. The notice below does not change the 30-day expiry or the current ability to refresh an unexpired token.
Migrate to an organization API key#
Existing personal tokens are deprecated. Starting December 7, 2026 at 17:00 UTC, Toku can retire personal-token access on routes with an organization API key replacement and enough usage history to show no personal-token activity. Routes still in use, without a replacement, or without enough usage history will keep working. Grant and wallet writes are not part of this cutoff. The notice itself does not change token expiry or self-refresh.
Successful REST v1 calls with a verified client-admin personal token can include Sunset: Mon, 07 Dec 2026 17:00:00 GMT alongside Deprecation and the migration link. The date marks the earliest scheduled cutover, not a guarantee that the route is ready to retire. The date appears on reads with a matching v1 organization-key replacement available across the route's aliases, not on writes, conditionally supported reads, or organization-key or HR AI responses.
Native support can differ by organization. In People First organizations, the v1 wallet catalog calls getWalletTypes, getTokenTypes, getTokenTypesNew and getNetworksNew do not complete with either credential and do not send a dated notice. Their matching organization-key scopes do not make those v1 calls work there.
- Open Settings › Developer and check the routes shown for each legacy personal token. Eligible HR admins who don't see Developer can use Account menu › API Keys. A listed scope is a permission requirement, not proof that the route works with a key. Test the same method and input with your scoped key before switching your integration. An empty route history does not show that an integration is unused.
- For supported v1 requests, use
Authorization: Bearer <organization API key>. If your client still sendsx-role-type, useCLIENT_ORG_ADMIN. For the current API, see organization API key authentication. - If a route does not support an organization API key on v1, check whether the current API reference documents a supported replacement. If not, keep using your existing token for that route.
Overview#
The Toku API uses Bearer token authentication. Every request must include a personal API token in the Authorization header, along with a role type header specifying the permission context.
Getting Your API Token#
Get a token
Personal tokens can no longer be created, in the dashboard or through the API. For new API access, follow the organization API key guide.
The rest of this page applies to a personal token you already have.
Use the token
Include the token in every API request:
Refresh a token
An API token can't create another token, so a leaked token can't spread. A token always acts as the person who created it, in the organization and role you call with.
A refreshed token lasts 30 days and has this shape:
Refresh before expiry
Tokens expire after 30 days. A token can refresh itself before expiry while it is your newest working token; an older token can't be refreshed, so create an organization API key instead. The body is optional and names only your own seat:
The response has the same shape as above, with a new token that lasts 30 days. Your newest token that still works keeps working for up to 7 more days (never longer than it already had), so you can switch over. An expired or revoked token stays that way.
Refreshing a token through the API needs x-role-type: CLIENT_ORG_ADMIN.
Required Headers#
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_TOKEN |
x-role-type | Yes | Role context for the request (see below) |
Content-Type | For POST/PUT/DELETE | Must be application/json |
Role Types#
The x-role-type header determines what permissions your request has. The person who owns the token must hold that role in the token's organization.
| Role | Description |
|---|---|
CLIENT_ORG_ADMIN | Full administrative access to the organization. Needed for grants, employees, invoices and most admin operations. |
FINANCE_ADMIN | Access to some payment and wallet operations, such as approving wallet requests |
USER | A recipient acting on their own data, such as adding their own wallet |
TOKU_ADMIN is always refused for API tokens.
For most 3rd party integrations, CLIENT_ORG_ADMIN is the recommended role type. It provides full access to grants, wallets, employees, and organization settings.
Token Scoping#
Each API token is scoped to a single organization. If you manage multiple organizations, you need a separate token for each.
The token inherits the permissions of the user who created it, and only that user can create or refresh it. If the user's role is revoked, or their login email changes, the token stops working. Like their sessions, a token made before the user's login last had its sessions ended stops working: that happens on a password reset or change, a two-factor reset or recovery, an administrator ending all of their sessions, moving their login to hosted sign-in, account linking or splitting, and accepting an invitation from a restricted invitation link. This also applies to tokens made before one of those events that already happened. Create an organization API key afterwards in Settings → Developer → API keys. A client admin can revoke any token in their organization.
Security Best Practices#
- Never expose tokens in client-side code — API tokens should only be used in server-to-server communication
- Rotate tokens regularly — use
refreshUserApiTokento get a new token before the current one expires - Use the narrowest token you can — for example, give a recipient-facing integration a token for that person's
USERseat rather than an admin's - Monitor usage — Toku logs all API access by token for audit purposes
Error Responses#
| Status | Meaning |
|---|---|
401 | Token is missing, unknown, revoked or expired, or its owner has no seat with the x-role-type role |
403 | Token is valid but the role isn't allowed to run that operation |
429 | Rate limit exceeded (see Errors & Rate Limits) |