Get your credentials
Create API keys in the Partner Portal and exchange them for a bearer token.
All requests to the BXNK API are authenticated with a short-lived bearer token. You create the token from an access key and secret issued in the Partner Portal.
Don't have Partner Portal access yet?Your BXNK contact sets up your account and MID after onboarding. Get in touch at [email protected].
Environments
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox | https://sandbox-api.bxnk.com | Build and test. Uses TEST keys. |
| Production | Shown in the Partner Portal under API Keys (bottom of the page) | Live money. Uses LIVE keys. |
A key's mode must match the environment. A TEST key used in production (or the reverse) returns 403.
1. Create an API key
- Log in to the Partner Portal.
- Go to API Keys.
- Create a key for the environment you need (
TESTorLIVE). - Copy the access key and secret straight away and store them in your secrets manager.
Keep the secret on your serverNever put the secret in a browser, mobile app or public repository. If a key is exposed, revoke it in the Partner Portal and create a new one.
2. Exchange it for a bearer token
curl -X POST https://sandbox-api.bxnk.com/api/v1/product-apis/auth/token \
-H "Content-Type: application/json" \
-d '{
"accessKey": "test_pk_1234567890",
"secret": "test_sk_1234567890"
}'Response 201
{
"message": "Product API token generated successfully",
"data": {
"accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"tokenType": "Bearer",
"expiresAt": "2026-03-24T10:00:00.000Z"
}
}3. Use the token
Send it on every other request:
Authorization: Bearer <accessToken>Tokens are valid until expiresAt (24 hours by default). Request a new one shortly before it expires. The token carries your MID, so you don't need to send it separately.
| Status | Meaning |
|---|---|
400 | accessKey or secret is missing |
401 | Credentials are invalid, or the key was revoked or expired |
Security checklist
- β Store keys in environment variables or a secrets manager
- β Rotate keys at least once a year, and immediately if exposed
- β Use separate keys per environment and per service
- β Only call the API over HTTPS
β Next: Make your first call
Updated 16 days ago

