- API Token - Bearer token for API calls
- HMAC Signature - Signed URLs for the consent flow
API Token
Use your API token for server-to-server API calls. Include it in theAuthorization header:
HMAC Signing
Consent flow URLs are signed with HMAC-SHA256 to prevent tampering. The signature validates that:- The URL parameters haven’t been modified
- The request originated from your application
- The link hasn’t expired (30-day validity)
Signature algorithm
- Collect all URL parameters (except
signature) - Sort parameters alphabetically by key
- Join as
key=value&key=value(raw values, not URL-encoded) - Generate HMAC-SHA256 using your signing secret
- Append signature as hex string
Parameters to sign
| Parameter | Required | Description |
|---|---|---|
client_id | Yes | Your client identifier |
redirect_uri | Yes | Callback URL |
state | Yes | CSRF protection token |
timestamp | Yes | ISO 8601 timestamp (e.g., 2024-01-15T10:30:00.000Z) |
uid | No | Your user identifier |
flow_config | No | Named configuration for custom branding |
Example signature generation
Credential management
Obtaining credentials
- Sign in to The Control Room
- Navigate to Settings → API Keys
- Generate or view your credentials
- Client ID - Public identifier for your application
- Signing Secret - Private key for HMAC signatures (keep secure)
- API Token - Bearer token for API calls
Rotating credentials
To rotate your credentials:- Go to Settings → API Keys in the Control Room
- Click Regenerate Keys
- A one-time retrieval link is emailed to the admin
- The link expires after 60 minutes
After regeneration, existing signed links remain valid for their 30-day period. Only new links need the new secret.
Security best practices
Store secrets securely
Store secrets securely
Use environment variables or a secrets manager (AWS Secrets Manager, HashiCorp Vault). Never commit secrets to version control.
Validate state parameter
Validate state parameter
Always verify the
state parameter in callbacks matches what you sent. This prevents CSRF attacks.Use HTTPS redirect URIs
Use HTTPS redirect URIs
Only HTTPS redirect URIs are allowed in production. This ensures the callback is encrypted.
Implement token refresh
Implement token refresh
API tokens don’t expire, but rotate them periodically as a security practice.