Quickstart
Send your first WhatsApp one-time passcode in five minutes.
1. Create an API token
In the Chatrixa dashboard, open Developer Tools → Access Tokens and generate a token. The token identifies your organization — keep it on your server and never ship it to browsers or mobile apps.
Choose Full access, or Specific permissions and tick only what your
integration calls — this guide needs Send and verify OTP codes (otp:send).
Each endpoint's required scope is listed in the API reference and in
Authentication. Tokens created before scopes existed keep full
access. A call without the scope it needs gets 403 API_KEY_SCOPE_MISSING.
2. Prepare an AUTHENTICATION template
WhatsApp requires OTP messages to use an AUTHENTICATION-category template:
- In Chatrixa, go to Templates and create a new template with category Authentication (Meta fixes the body text; you choose the language and the code-delivery button, usually Copy code).
- Wait for Meta to approve it, then sync templates in Chatrixa.
When you have exactly one approved authentication template you don't need to
reference it by name — /otp/send picks it automatically.
3. Send a code
curl -X POST https://chatrixa.com/api/otp/send \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671"}'
Response:
{
"statusCode": 200,
"code": "SENT",
"message": "Verification code sent.",
"data": {
"phone": "+14155552671",
"template": "otp_login_code",
"language": "en_US",
"expires_in": 300,
"message_id": "wamid.HBgLMTQxNTU1..."
}
}
4. Verify the customer's code
curl -X POST https://chatrixa.com/api/otp/verify \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone": "+14155552671", "code": "482913"}'
Response:
{ "statusCode": 200, "code": "VERIFIED", "message": "Phone number verified.", "verified": true }
That's the whole flow — Chatrixa generates the code, delivers it, stores only a hash, and enforces expiry, cooldowns, and attempt limits for you.
Next steps
- OTP API — every parameter, error code, and limit
- Downloads — ready-made store plugins and SDKs
- API Reference — the full platform API