Skip to content

Authentication

All API4Business APIs use OAuth2 Client Credentials authentication.

How it works

  1. You send your client_id and client_secret to the token endpoint
  2. You receive an access_token
  3. You include the token in the Authorization header of every API request

Token endpoint

POST https://api.api4business.com/oauth/v1/token

Request

ParameterTypeRequiredDescription
grant_typestringYesMust be client_credentials
client_idstringYesYour OAuth2 client ID
client_secretstringYesYour OAuth2 client secret

Response

json
{
  "access_token": "eyJhbGciOiJSUzI1NiIsInR5cCI6...",
  "token_type": "Bearer",
  "expires_in": 3600
}

Using the token

Include the access token in the Authorization header:

Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6...

Token expiry

Access tokens expire. Check the expires_in field and refresh before expiry. Implement token caching in your application to avoid unnecessary token requests.

Getting credentials

Sign up at developers.api4business.com to get your client credentials.

Sandbox vs production

You will receive separate credentials for sandbox and production environments. See Environments for details.

What's next

Released under the API4Business Terms of Service