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

Full Authorization (for Wazzup Label)

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

Use this authorization flow if you operate as a Wazzup Label partner. The end customer will register or log into their Wazzup account → grant your partner application access via iframe/redirect. You will receive the customer's client_access_token and refresh_token, which enable you to make API requests on their behalf.

To use the methods described above, use Basic authentication with your Wazzup partner account login credentials: Authorization: Basic base64(email:password)

Step 1. Direct the end customer to /v2/oauth/authorize

The first step is to generate a URL for the end‑customer to log into their Wazzup account.

Once you have generated the URL with all required parameters, direct the end‑customer to it → the customer logs into Wazzup → your redirect_uri will receive a code parameter. This code can then be exchanged for user access tokens in the second step.

Method: GET /v2/oauth/authorize

Query parameters:

We use OAuth with the PKCE extension. Therefore, requests must include a code_verifier and a code_challenge.

code_verifier is a secret random string that must be:

  • generated by your application
  • composed only of English letters, numbers, and the following characters: -, ., _, ~
  • between 43 and 128 characters in length, inclusive

Example: dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk

code_challenge — is a secured representation of the code_verifier, created by:

  • hashing the code_verifier using the SHA-256 algorithm
  • then encoding the result in Base64URL format
Parameter. Required are marked with * Example Description
response_type* code Authorization code. Provide the code
client_id* your_client_id Provided by the Wazzup manager
redirect_uri* https://callback

The URL to which your end customer is redirected after logging into Wazzup. If you are still developing the integration and have not yet submitted a redirect_uri, you can use http://127.0.0.1 — this address is set by default and is sufficient for testing. To change the redirect_uri, contact our support team with your current address

scope* transport, crm A list of permissions you are requesting from the user. Specify transport, crm
state* state_partner_123 Anti-CSRF token for security. Generate this token yourself
code_challenge* <base64url
(SHA256
(code_verifier))>
The transformed value of the code_verifier using the S256 method. Do not send the actual code_verifier in this request
code_challenge_method* S256 The recommended hashing method. Specify S256

Request example:

GET https://tech.wazzup24.com/v2/oauth/authorize
?response_type=code
&client_id=partner_client_id
&redirect_uri=https%3A%2F%2Fyour.website%2Fcallback
&scope=transport%2Ccrm
&state=state_tech_partner_123
&code_challenge=EADnwig85jbEO4pP09-AMi-JnGf7VnO9DS9rvHsq5sY
&code_challenge_method=S256

After the end customer logs into Wazzup using the provided link, Wazzup will redirect to your redirect_uri with the following parameters:
?code=...&state=....

Verify that the state value received from Wazzup matches the one you sent in the initial request.

Save the code value from the browser's address bar. Copy the value of the "code=" parameter up to the "&state" delimiter.

Common errors at Step 1

code When it occurs How to resolve
VALIDATION_FAILED Input data validation error Verify the correctness of the request parameters
OAUTH_REDIRECT_
URI_INVALID
Incorrect redirect_uri specified Use the redirect_uri registered in the Wazzup system
OAUTH_PARTNER_
NOT_FOUND
Partner not found Ensure the client_id is provided correctly
OAUTH_PARTNER_
NOT_ACTIVE
Partner is inactive Contact your manager to activate the partner account
OAUTH_SCOPE_FORBIDDEN Requested scope is not permitted Coordinate the requested permissions (scope) with your manager

Step 2. Exchange the received code for user access tokens

Method: POST /v2/oauth/token
POST
│
├── grant_type *
│
└── authorize_code_data *
  ├── code *
  ├── redirect_uri *
  ├── client_id *
  └── code_verifier
Body parameter. Required are marked with * Parameter type Parameter description
grant_type* string The OAuth grant type. Specify authorization_code
authorize_code_data* object authorize_code_data Data required for the authorization_code grant

authorize_code_data (object)

Body parameter. Required are marked with * Parameter type Parameter description
code* string The authorization code received in Step 1
redirect_uri* string

The URL to which your end customer is redirected after logging into Wazzup. If you are still developing the integration and have not yet submitted a redirect_uri, you can use http://127.0.0.1 — this address is set by default and is sufficient for testing. To change the redirect_uri, contact our support team with your current address

client_id* string The client_id provided by your Wazzup manager
code_verifier string The original code_verifier you created in the first step. Send the actual code_verifier in this request, not its hashed version

Request example:

curl -X POST 'https://tech.wazzup24.com/v2/oauth/token' \
-H 'Authorization: Basic base64(email:password)' \
-H 'Content-Type: application/json' \
-d '{
"grant_type": "authorization_code",
"authorize_code_data": {
"code": "AUTH_CODE_FROM_REDIRECT",
"redirect_uri": "https://your.app/callback",
"client_id": "your_client_id",
"code_verifier": "ORIGINAL_CODE_VERIFIER"
}
}'

Response example:

{
"data": {
"access_token": "eyJhbGciOieyJhbGciOieyJhbGciOieyJhbGciOieyJhbGciOieyJhbGciOieyJhbGciOieyJhbGciOi",
"refresh_token": "def50200def50200def50200def50200def50200def50200def50200",
"token_type": "Bearer",
"expires_in": 86400
},
"meta": {
"timestamp": 1759481570
}
}

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 the end-customer's behalf with the header: Authorization: Bearer <client_access_token>

Common errors at Step 2

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 Invalid grant type 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
Requested subject doesn't 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 Check the token's validity with your Wazzup manager or use a valid partner_token
OAUTH_TOKEN_INVALID_
OR_EXPIRED
Token is invalid or 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 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 the manager

What's next

After authorization: