Never ask a merchant for a partner key, and never ship your partner key to a merchant’s server. A partner key acts for every application of your account.
Model A: the merchant’s own application
The merchant signs up to Tawked, creates an application with the products they need, and gives your integration that application’s keys. Your code calls the public API exactly as any developer does. Every limit, price and review rule is the merchant’s own.1
Ask for keys with the least access
Tell the merchant which access to give the key. They choose it on Application settings → API keys, Create a key, under Access: Custom, then a level per product (see Key access):
A key is created by the owner, or an admin or developer whose access covers the whole application. It shows once. Store it as a secret on the merchant’s server: encrypted at rest, never printed back in full, never sent to a browser.
2
Take a test key during review
A live key sends codes only once the application is approved. Until then, a test key (
tk_test_) sends real codes, only to the account owner’s verified phone, stamped as a test, and capped per application (see Testing and the sandbox). Give your settings a field for each key and a switch for “use the test key for codes”. WhatsApp has no test key: the live key sends WhatsApp messages while the application is in review or approved.3
Identify your integration
Send a
User-Agent that names your integration and its version, such as YourPlatform-Tawked/1.4.0. Send Authorization: Bearer <key> and JSON bodies.4
Add a Test connection button
Let the merchant check the keys without sending anything. Probe with a resend of the all-zeros id: it needs the scope that sends, checks the application’s state, and sends nothing.
Test connection
For WhatsApp,
GET /v1/whatsapp/templates with the live key answers 200 with the templates when the number is ready. 409 no_whatsapp_number and 409 number_disconnected mean the merchant has to connect the number in the console.5
Send, and retry safely
Send an
Idempotency-Key on every POST, one per business event (an order and its status, a sign-in attempt), so a retry never sends twice. Retry with the same key only on 502 send_failed, 503 templates_unavailable, 429 too_many_requests and network timeouts. Every other error is final: show the merchant a sentence for it. The Errors page lists every code. Match on the error string, never on the HTTP status alone.- Saudi mobiles only. Normalise numbers to
+9665…before calling, and skip any other number without calling. - Pass
client_iponPOST /v1/verify/start: the visitor’s address, never your server’s. The protection guard needs it. - Never promise a sender name. A Verify SMS goes out under Tawked’s sender ID and names the merchant’s reviewed application. A WhatsApp message comes from the merchant’s own number.
- Utility templates for order updates. Marketing templates need the customer’s consent, which your integration must collect first.
- Send in the background. A WhatsApp send answers
202once accepted. Queue it outside the customer’s request, and read the outcome from themessage.*webhooks orGET /v1/whatsapp/messages/{id}.
Model B: the Partner API
You hold one partner account. You provision a Verify application for each merchant by API, under your ownexternal_id, and send codes for it with your partner key and an application field. Each application is reviewed or activated at once, by your account’s approval mode, and the outcome reaches your webhook as service.approved or service.rejected. You hold the balance and the relationship; the SMS names the merchant’s reviewed application.
Client applications carry Tawked Verify only. A merchant who also wants WhatsApp from their own number connects their own application (model A).
Start with the Partner API overview, then Applications and Sending codes for an application.
Questions while you build
Write to support@tawked.com with theX-Request-Id of the call in question.