Before you send
Your BotLinkd account must have an active connected WhatsApp Cloud API platform and valid API credentials.
Get your App Key and Auth Key
Sign in to BotLinkd and copy the credentials assigned to the relevant platform or API configuration. Never expose them in frontend JavaScript, public repositories or screenshots.
Store credentials securely
Use environment variables or a managed secret store on your backend server.
Format the recipient number
Use the international number accepted by your connected account, normally country code followed by the subscriber number without spaces.
Send a POST request
Use the text endpoint for an eligible text message or the template endpoint for approved business-initiated templates.
Check the response
Validate the HTTP status and safely parse the JSON response. An accepted request does not guarantee delivery or reading.
First request
Send a supported text message using the official Cloud API endpoint.
https://botlinkd.com/api/whatsapp/messagecurl --request POST 'https://botlinkd.com/api/whatsapp/message' \
--form 'appkey="YOUR_APP_KEY"' \
--form 'authkey="YOUR_AUTH_KEY"' \
--form 'to="923001234567"' \
--form 'message="Hello from BotLinkd"'$response = (new \GuzzleHttp\Client())->post(
'https://botlinkd.com/api/whatsapp/message',
[
'form_params' => [
'appkey' => getenv('BOTLINKD_APP_KEY'),
'authkey' => getenv('BOTLINKD_AUTH_KEY'),
'to' => '923001234567',
'message' => 'Hello from BotLinkd',
],
'timeout' => 30,
]
);
$data = json_decode((string) $response->getBody(), true, 512, JSON_THROW_ON_ERROR);Templates may be required
Business-initiated messages outside an eligible customer-service conversation may require an approved WhatsApp template.