Skip to main content

Authentication

All Coolblue Business APIs are protected with OAuth 2.0, client credentials grant. You exchange a client_id and client_secret for a short-lived access token and send that token with every request.

1. Get credentials​

Credentials consist of a client_id and a client_secret. They identify your integration and must be kept secret. Contact your Coolblue Business representative or the Business Journeys team. We will ask for:

  • your company name and integration use case;
  • a technical contact person;
  • an email address and mobile phone number, so we can deliver the secret securely with two-factor authentication.

You receive separate credentials for Acceptance and Production.

2. Request an access token​

Post your credentials as form parameters to the token URL of the API and environment you are calling.

curl -X POST "https://auth.business.coolblue-acceptance.eu/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials" \
-d "client_id=YOUR_CLIENT_ID" \
-d "client_secret=YOUR_CLIENT_SECRET"

The examples use Acceptance. See Environments for the Production token URLs.

A successful response looks like this:

{
"access_token": "eyJraWQiOi...",
"token_type": "Bearer",
"expires_in": 3600
}

3. Call the API​

Send the token in the Authorization header, together with the required User-Agent header:

GET /orders/12345/status HTTP/1.1
Host: business.coolblue-acceptance.eu
Authorization: Bearer eyJraWQiOi...
User-Agent: Coolblue-YourCompanyName

The scopes needed for each endpoint are listed in its API reference page.

Best practices​

  • Store client_id and client_secret in a secret store, never in source control or client-side code.
  • Cache the access token and reuse it until shortly before expires_in has passed, instead of requesting a token for every call.
  • When you receive 401 Unauthorized, request a new token once and retry.
  • Ask us to rotate your secret regularly, and immediately after any suspected leak.