
What This Enables
- Embedded digital wallets. Give your users a digital wallet using Consul. Surface a user’s Consul balance and transaction history directly in your UI.
- Checkout and payment acceptance flows. Send and reconcile funds from your users’ Consul balances natively in your app.
- Fiat deposits from your platform. Trigger deposits into a user’s Consul balance from your platform without them leaving your app.
Prerequisites
| Name | What it is | How to get it |
|---|---|---|
client_id | Identifies your application to Consul during the OAuth flow | Provided by Consul when your app is registered |
client_secret | Secret used to exchange authorization codes for tokens. Never expose this client-side. | Provided by Consul when your app is registered |
redirect_uri | The URL Consul redirects users to after they grant access. Must match what was registered. | You provide this to Consul during app registration |
API keys and OAuth client credentials serve different purposes. An API key authenticates
requests to your own Consul account. A client ID + client secret authenticate your app
during the OAuth flow so it can act on behalf of other users’ accounts. When making API
requests on behalf of a connected user, use the OAuth access token, not your API key.
Authorization Code Flow
Consul uses the OAuth 2.0 authorization code flow: 1. Redirect the user to Consul’s authorization endpoint:state parameter should be a random, unguessable string tied to the user’s session.
Verify it when Consul redirects back to prevent CSRF attacks.
2. Exchange the authorization code for tokens:
access_token, refresh_token, expires_in, and the granted scope.
3. Make API requests on behalf of the user:
Refreshing Tokens
Access tokens expire. Use the refresh token to get a new one without requiring the user to re-authorize:Revoking Access
To disconnect a user’s account, revoke their token:Scopes
Request scopes as a space-separated string in thescope query parameter during authorization.
| Scope | Description |
|---|---|
read | Read account data, balances, recipients, transactions, and payout status |
write | Create and manage recipients, initiate payouts, and modify account settings |
Request the minimum scopes your application needs. Users see the requested permissions
on the consent screen before granting access.

