API Keys Overview
API keys allow server-side access to RecurrBase.
Keys are generated in dashboard
Keys can have scopes:
READ_ONLYSUBSCRIPTIONS_MANAGEFULL
Never expose API keys in client-side code. API keys should only be used in server-side environments.
Generate Key
POST /api-keys
{
"label": "my backend",
"scopes": ["FULL"]
}
Response:
{
"key": "rbk_xxxxx..."
}
This is the only time the full key is returned. Store it securely immediately.
Using API Keys
Include the API key in the Authorization header:
Authorization: Bearer rbk_xxxxx...
Example with curl:
curl -H "Authorization: Bearer rbk_xxxxx..." \ https://api.recurrbase.xyz/subscriptions/status?address=0x...
Key Scopes
READ_ONLY- Can read subscription statusSUBSCRIPTIONS_MANAGE- Can manage subscriptionsFULL- Full access to all endpoints
See Scopes for details.
Security
- Store API keys in environment variables
- Never commit keys to version control
- Rotate keys regularly
- Revoke unused keys
Use the principle of least privilege. Only grant the minimum scope needed for your use case.
See Managing Keys.