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)
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.
The machine_token is used to exchange it for user access tokens in the next step.
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* |
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 |
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.
POST /v2/oauth/tokenPOST /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 |
| 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 |
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>
| 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_ |
Incorrect redirect_uri specified |
Use the redirect_uri agreed upon with Wazzup |
OAUTH_AUTHORIZATION_ |
Invalid authorization code | Request a new authorization code — the provided one has either expired or does not belong to your client |
OAUTH_CODE_CHALLENGE_ |
Unknown PKCE method (code_challenge_method) |
Use a supported PKCE method (S256, PLAIN) |
OAUTH_CODE_VERIFIER_ |
Invalid or missing code_verifier |
Verify the correct generation and transmission of the code_verifier |
OAUTH_REQUESTED_ |
The requested subject does not match the expected value | Ensure you are using the correct machine token |
OAUTH_SUBJECT_TOKEN_ |
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 refresh_token |
Repeat the authorization process to obtain a new token pair |
OAUTH_AUTHORIZATION_ |
Invalid authorization header | Verify that the token is correctly passed in the Authorization header |
OAUTH_INVALID_ |
Invalid or expired partner_token |
Verify the token's validity with your manager or use a valid partner_token |
OAUTH_TOKEN_INVALID_ |
Token is invalid or has expired | Refresh the token or repeat the authorization process |
OAUTH_TOKEN_UNKNOWN_ |
Token is unknown or has been revoked | Repeat the authorization process or refresh the token |
OAUTH_PARTNER_ |
Partner not found | Contact your Wazzup manager for details |
OAUTH_PARTNER_ |
Partner is inactive | Contact your manager to activate the partner account |
OAUTH_CLIENT_NOT_ |
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 |
After authorization: