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

EnvironmentBase URLPurpose
Sandboxhttps://sandbox-api.bxnk.comBuild and test. Uses TEST keys.
ProductionShown 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

  1. Log in to the Partner Portal.
  2. Go to API Keys.
  3. Create a key for the environment you need (TEST or LIVE).
  4. Copy the access key and secret straight away and store them in your secrets manager.
🚧

Keep the secret on your server

Never 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.

StatusMeaning
400accessKey or secret is missing
401Credentials 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


Did this page help you?