| Method | Best for | Header format |
|---|---|---|
| API Key | Server-to-server integrations | Authorization: Basic <ACCESS_TOKEN> |
| OAuth 2.0 | User-authorized access | Authorization: Bearer <ACCESS_TOKEN> |
API Key authentication
API key authentication is the simplest way to get started. It is ideal for server-side integrations where your application acts on behalf of a single business account.Get your API key
- Go to Settings > API in your Bitwage Business Account.
- Register a new Authentication App (if you haven’t already).
- Click Self Auth beside the “Authorized Authentication Apps” header.
- Click on your app — your API key is the Access Token field.
Use your API key
Include the API key in theAuthorization header:
OAuth 2.0 authentication
OAuth 2.0 uses the Authorization Code flow. This lets your application act on behalf of a Bitwage user after they grant permission.Step 1: Configure your application
After creating your Authentication App, note your Client ID and Client Secret from the app widget under “My Authentication Apps”. Keep your Client Secret secure.Step 2: Request an authorization code
Redirect the user to the Bitwage authorization endpoint:Step 3: Exchange the code for an access token
Exchange the authorization code for an access token:Step 4: Use the access token
Include the access token in subsequent requests:OAuth scopes
When registering your app, select the scopes your integration needs:| Scope | Description |
|---|---|
c_company_detail | Read company details |
c_company_worker_list | List company workers |
c_company_worker_invitations_list | List worker invitations |
c_company_workers_invite | Invite workers |
c_company_workers_pay | Create payroll |
u_user_create | Create users |
u_user_update | Update users |
u_user_update_doc | Upload user documents |
u_user_detail | Read user details |
u_user_document_list | List user documents |
u_user_payer_create | Create payers |
u_user_payer_update | Update payers |
u_user_payer_detail | Read payer details |
u_user_payer_list | List payers |
u_user_bank_details | Read bank details |
u_user_distribution_create | Create distributions |
u_user_distribution_update | Update distributions |
u_user_distribution_detail | Read distribution details |
u_user_distribution_list | List distributions |
u_user_kyc_initiate | Initiate KYC verification |