List templates
curl --request GET \
--url https://tawked.com/v1/whatsapp/templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tawked.com/v1/whatsapp/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/whatsapp/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/whatsapp/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"name": "order_received_v1",
"language": "ar",
"category": "UTILITY",
"status": "APPROVED",
"placeholders": {
"kind": "named",
"header": [],
"body": [
"name",
"order"
],
"buttons": [
{
"index": 0,
"type": "url"
}
]
}
}
]
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "account_not_active"
}{
"error": "service_not_found"
}{
"error": "no_whatsapp_number"
}{
"error": "too_many_requests"
}{
"error": "internal_error"
}{
"error": "templates_unavailable"
}WhatsApp
List templates
Lists the templates of the number’s WhatsApp Business Account as Meta holds them, with the placeholders each one expects, so your code can discover what to send without WhatsApp Manager. Cached for 5 minutes.
GET
/
v1
/
whatsapp
/
templates
List templates
curl --request GET \
--url https://tawked.com/v1/whatsapp/templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://tawked.com/v1/whatsapp/templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://tawked.com/v1/whatsapp/templates",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}import requests
url = "https://tawked.com/v1/whatsapp/templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": [
{
"name": "order_received_v1",
"language": "ar",
"category": "UTILITY",
"status": "APPROVED",
"placeholders": {
"kind": "named",
"header": [],
"body": [
"name",
"order"
],
"buttons": [
{
"index": 0,
"type": "url"
}
]
}
}
]
}{
"error": "service_required"
}{
"error": "unauthorized"
}{
"error": "account_not_active"
}{
"error": "service_not_found"
}{
"error": "no_whatsapp_number"
}{
"error": "too_many_requests"
}{
"error": "internal_error"
}{
"error": "templates_unavailable"
}