Arrow
Get started with Wazzup
Arrow
How to connect a messenger
Arrow
How to use Wazzup chats
Arrow
How to pay for the service
Arrow
Bitrix24
Arrow
Kommo
Arrow
Zoho CRM
Arrow
HubSpot
Arrow
Pipedrive
Arrow
Other CRMs
Arrow
How to sell even easier
Arrow
All about WABA
Arrow
For partners
Arrow
Public API
For partners
Arrow

Simplified Authorization (for White Label)

Authorization grants you access to the end‑customer account, allowing you to connect channels, send messages, and perform other actions on the end-customer's behalf.

Use simplified authorization if you operate under the White Label model. This allows you to obtain client tokens and act on behalf of end customers without requiring their direct interaction.

If you operate under the Wazzup Label model, obtain user tokens via OAuth instead.

How simplified authorization works: the partner first acquires a service machine_token, then exchanges it (token‑exchange) for tokens specific to a given end‑customer account.

To use simplified authorization for obtaining user access tokens, the end‑customer account must have been created by you.

Use Basic authentication with your Wazzup partner account login credentials in the request headers: Authorization: Basic base64(email:password)

Step 1. Create an end-customer account

Create an end‑customer account using the POST /v2/accounts method. You will then receive the customer's account_id, which is required to obtain user access tokens.

Save the account_id returned in the response — you will need it in Step 3.

Step 2. Obtain a machine_token

The machine_token is used to exchange it for user access tokens in the next step.

Method: POST v2/oauth/token
Parameter. Required are marked with * Type Description
grant_type* string OAuth grant type. Specify client_credentials
client_credentials_data* object Data required for client_credentials grant
client_credentials
_data.scope
*
string

A list of permissions you are requesting from the user — i.e., which actions you need to perform in the user's account.

The requested set of scope must be agreed upon with your Wazzup manager

Request example

curl -L 'https://tech.wazzup24.com/v2/oauth/token' \
-H 'Authorization: Basic base64(email:password)' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "client_credentials",
"client_credentials_data": {
"scope": "transport,crm"
}
}'

Response example:

{
"data": {
"access_token": "eyJahkboGpppcilllO77iJ99IU12zI671NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjozmYzItOThjYS1kY2VjOWVjNTZjMTciLCJpYXQiOjE3NjMwMjc4NzYsImV4cCI6MTc2MzA1NjY3NiwianRpIjoiNWY3OWY0ZDgtZjNlYy00M2VhLTgyYjctMGI4YzJiZmU5hIn0.l",
"token_type": "Bearer",
"expires_in": 28800
},
"meta": {
"timestamp": 1763027876
}
}

Result: machine_token (returned in the response as access_token), which you will exchange for user access tokens in the next step.

Store the machine_token in a secure Secret Manager or vault. Never expose it to the frontend or client-side code.

Step 3. Exchange the machine_token for user access tokens

Method: POST /v2/oauth/token
POST /v2/oauth/token
│
├── grant_type *
│
└── token_exchange_data *
  ├── subject_token *
  ├── subject_token_type *
  ├── requested_subject *
  └── scope *
Parameter. Required are marked with * Parameter type Parameter description
grant_type* string Specify "urn:ietf:params:oauth:grant-type:token-exchange"
token_exchange_data* object token_exchange_data Data required to obtain the tokens

token_exchange_data (object)

Parameter. Required are marked with * Parameter type Parameter description
subject_token* string The machine_token obtained in Step 2 (returned in the response as access_token)
subject_token_type* string Specify "urn:wazzup:oauth:token-type:machine_token"
requested_subject* string The customer's account_id, received when creating the end‑customer account
scope* string

A list of permissions you are requesting from the user — i.e., which actions you need to perform in the user's account.

The requested set of scope must be agreed upon with your Wazzup manager

Request example

curl -L 'https://tech.wazzup24.com/v2/oauth/token' \
-H 'Authorization: Basic base64(email:password)' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "urn:ietf:params:oauth:grant-type:token-exchange",
"token_exchange_data": {
"subject_token": "eyJahkboGpppcilllO77iJ99IU12zI671NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjozmYzItOThjYS1kY2VjOWVjNTZjMTciLCJpYXQiOjE3NjMwMjc4NzYsImV4cCI6MTc2MzA1NjY3NiwianRpIjoiNWY3OWY0ZDgtZjNlYy00M2VhLTgyYjctMGI4YzJiZmU5hIn0.l",
"subject_token_type": "urn:wazzup:oauth:token-type:machine_token",
"requested_subject": "12345678",
"scope": "transport,crm"
}
}'

Response example:

{
"data": {
"access_token": "eyJhbGciOi...",
"refresh_token": "def50200...",
"token_type": "Bearer",
"expires_in": 86400
},
"meta": {
"timestamp": 1759481962
}
}

Result: You now have the end‑customer's client_access_token (returned as access_token in the response) for making API calls and a refresh_token for renewing it.

You can now proceed to add channels, send messages, and perform other actions.

Authorize all calls made on behalf of the end‑customer with the header: Authorization: Bearer <client_access_token>

Common errors

code When it occurs How to resolve
VALIDATION_FAILED Input data validation error Verify the correctness of the data being sent
OAUTH_INVALID_GRANT_TYPE An invalid grant type was specified Ensure the grant_type value is correct
OAUTH_REDIRECT_
URI_INVALID
Incorrect redirect_uri specified Use the redirect_uri agreed upon with Wazzup
OAUTH_AUTHORIZATION_
CODE_INVALID
Invalid authorization code Request a new authorization code — the provided one has either expired or does not belong to your client
OAUTH_CODE_CHALLENGE_
METHOD_UNKNOWN
Unknown PKCE method (code_challenge_method) Use a supported PKCE method (S256, PLAIN)
OAUTH_CODE_VERIFIER_
INVALID
Invalid or missing code_verifier Verify the correct generation and transmission of the code_verifier
OAUTH_REQUESTED_
SUBJECT_MISMATCH
The requested subject does not match the expected value Ensure you are using the correct machine token
OAUTH_SUBJECT_TOKEN_
TYPE_MISMATCH
Mismatched subject_token_type Verify the accuracy of the provided subject_token_type
OAUTH_CLIENT_ID_MISMATCH client_id mismatch Ensure the client_id is passed correctly and belongs to your application
OAUTH_REFRESH_TOKEN_
INVALID_OR_EXPIRED
Invalid or expired refresh_token Repeat the authorization process to obtain a new token pair
OAUTH_AUTHORIZATION_
HEADER_INVALID
Invalid authorization header Verify that the token is correctly passed in the Authorization header
OAUTH_INVALID_
PARTNER_TOKEN
Invalid or expired partner_token Verify the token's validity with your manager or use a valid partner_token
OAUTH_TOKEN_INVALID_
OR_EXPIRED
Token is invalid or has expired Refresh the token or repeat the authorization process
OAUTH_TOKEN_UNKNOWN_
OR_REVOKED
Token is unknown or has been revoked Repeat the authorization process or refresh the token
OAUTH_PARTNER_
NOT_FOUND
Partner not found Contact your Wazzup manager for details
OAUTH_PARTNER_
NOT_ACTIVE
Partner is inactive Contact your manager to activate the partner account
OAUTH_CLIENT_NOT_
CHILD_OF_PARTNER
The end‑customer does not belong to this partner Verify that the customer is indeed associated with your partner account
OAUTH_SCOPE_FORBIDDEN Requested scope is not permitted Coordinate the required permissions (scope) with your manager
OAUTH_MISSING_GRANT Client has not granted access or has revoked it The client needs to go through the oauth identification again

What's next

After authorization: