Creating a token
1
Open API token settings
Navigate to Settings > API Tokens in your Privy dashboard.
2
Create a new token
Click Create Token. Choose a descriptive name, select the scopes you need, and pick an expiration period.
3
Copy the token
The token is displayed once after creation. Copy it immediately and store it securely — you won’t be able to view it again.
If you use subaccounts, each eligible subaccount can create its own tokens under Settings > API Tokens. A token created in a subaccount can only access that subaccount — it cannot reach the parent or other subaccounts.
Token format
API tokens use the prefixprivy_ followed by a 40-character hex string:
Scopes
Scopes control what your token can access. You select scopes when creating the token.Subaccount access
If your account has subaccounts, a parent-account API token can act on some or all of them. Pick the reach when you create the token — the setting only appears if your account actually has subaccounts.Subaccount reach is fixed at creation and can’t be edited later. To grant or remove reach to a subaccount, revoke the token and create a new one.
Targeting a subaccount on a request
To find the subaccounts your token can reach, callGET /v1/account without a Privy-Account-Id header. The response’s data.subaccounts list contains the reachable subaccounts; use a subaccount’s id as the Privy-Account-Id value.
Privy-Account-Id header alongside your normal Authorization header.
- Header omitted — the request runs against the parent account.
- Header present, subaccount allowed by the token — the request runs against that subaccount. Rate limits are tracked per subaccount.
- Header present, subaccount not allowed by the token — the request returns
403 forbidden.
Using a token
Include the token in theAuthorization header as a bearer token — exactly the same as an OAuth access token:
Authorization header format.
Expiration
When creating a token, choose from the following lifetimes:
Tokens that were created with an expiration can be renewed from the dashboard to extend them by their original duration.
Revoking a token
You can revoke a token at any time from Settings > API Tokens in the dashboard. Revoked tokens are rejected immediately — any request using a revoked token receives a401 error.
Limits
Each Privy account can have up to 25 active API tokens at a time. Revoked and expired tokens do not count toward this limit. Rate limits apply to API tokens the same way they apply to OAuth access tokens — all requests under the same account share the same rate limit budget.Error responses
See the Errors page for all error codes.