v1
latestOpenAPI 3.0.02026-07-265081124.2 KBAPI Tokens
Derive scoped API token
Creates a new scoped API token for the authenticated partner. Requires Privy authentication (Bearer token). The token secret is returned once at creation — store it securely. Requested scopes must be a subset of the partner's allowed scopes.
post/auth/api-tokens/derive
Request body
Example request
{
"label": "production-trading-bot",
"scopes": [
"trading",
"account_creation"
]
}Response
Token created successfully. The secret is only returned once.
Example response
{
"apiKey": "dGVzdC10b2tlbi0x",
"secret": "c2VjcmV0LWtleS1leGFtcGxlLWJhc2U2NC1lbmNvZGVk",
"tokenId": "dGVzdC10b2tlbi0x",
"scopes": [
"trading",
"account_creation"
],
"profile": {
"id": 42,
"account": "0x27b4afBD88fE7c88c6897BB0b4ADE338D0401E37"
}
}