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.
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"
}
}Changes
Changed in 4 of the 32 revisions of this API.14
- ○
the endpoint scheme security
HmacAuthwas added to the APIapi-security-added
- ○
the endpoint scheme security
ApiKeyAuthwas removed from the APIapi-security-removed
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○
- ○
endpoint added
endpoint-added
- ○
- ▲
api path removed without deprecation
api-path-removed-without-deprecation
This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ▲
- ○
endpoint added
endpoint-added
- ○