List WABA Templates
curl --request GET \
--url https://app.adsera.in/api/pub/wa/template/list/{whatsapp} \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/template/list/{whatsapp}"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/template/list/{whatsapp}', 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://app.adsera.in/api/pub/wa/template/list/{whatsapp}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/template/list/{whatsapp}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/template/list/{whatsapp}")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/template/list/{whatsapp}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"templates": [
{
"_id": "60c72b2f9b1d8e001f8a1b2d",
"company": "60c72b2f9b1d8e001f8a1b2a",
"whatsapp": "60c72b2f9b1d8e001f8a1b2c",
"templateId": "8794876541213",
"wabaId": "123456789012345",
"name": "order_confirmation",
"language": "en_US",
"libraryTempName": "<string>",
"components": [
{
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
},
"text": "<string>",
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"example": {
"header_handle": [
"<string>"
],
"header_text": [
"<string>"
],
"header_text_named_params": {},
"body_text": [
[
"<string>"
]
],
"body_text_named_params": {}
},
"buttons": [
{
"text": "<string>",
"url": "<string>",
"example": "<string>",
"phoneNumber": "<string>",
"flow_id": "<string>",
"flow_name": "<string>",
"flow_json": {},
"navigate_screen": "<string>",
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
]
}
],
"cards": [
{
"components": "<array>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 25,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Template
List WhatsApp Templates
Retrieves a paginated list of WhatsApp templates for a specific WABA account.
GET
/
api
/
pub
/
wa
/
template
/
list
/
{whatsapp}
List WABA Templates
curl --request GET \
--url https://app.adsera.in/api/pub/wa/template/list/{whatsapp} \
--header 'x-api-key: <api-key>' \
--header 'x-api-secret: <api-key>'import requests
url = "https://app.adsera.in/api/pub/wa/template/list/{whatsapp}"
headers = {
"x-api-key": "<api-key>",
"x-api-secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-api-key': '<api-key>', 'x-api-secret': '<api-key>'}
};
fetch('https://app.adsera.in/api/pub/wa/template/list/{whatsapp}', 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://app.adsera.in/api/pub/wa/template/list/{whatsapp}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>",
"x-api-secret: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.adsera.in/api/pub/wa/template/list/{whatsapp}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("x-api-secret", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.adsera.in/api/pub/wa/template/list/{whatsapp}")
.header("x-api-key", "<api-key>")
.header("x-api-secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.adsera.in/api/pub/wa/template/list/{whatsapp}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
request["x-api-secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": 200,
"success": true,
"error": null,
"templates": [
{
"_id": "60c72b2f9b1d8e001f8a1b2d",
"company": "60c72b2f9b1d8e001f8a1b2a",
"whatsapp": "60c72b2f9b1d8e001f8a1b2c",
"templateId": "8794876541213",
"wabaId": "123456789012345",
"name": "order_confirmation",
"language": "en_US",
"libraryTempName": "<string>",
"components": [
{
"limited_time_offer": {
"text": "<string>",
"has_expiration": true
},
"text": "<string>",
"add_security_recommendation": true,
"code_expiration_minutes": 123,
"example": {
"header_handle": [
"<string>"
],
"header_text": [
"<string>"
],
"header_text_named_params": {},
"body_text": [
[
"<string>"
]
],
"body_text_named_params": {}
},
"buttons": [
{
"text": "<string>",
"url": "<string>",
"example": "<string>",
"phoneNumber": "<string>",
"flow_id": "<string>",
"flow_name": "<string>",
"flow_json": {},
"navigate_screen": "<string>",
"supported_apps": [
{
"package_name": "<string>",
"signature_hash": "<string>"
}
]
}
],
"cards": [
{
"components": "<array>"
}
]
}
],
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"totalCount": 25,
"currentPage": 1,
"perPage": 10
}{
"status": 401,
"success": false,
"error": "Unauthorized: Please provide valid API credentials."
}{
"status": 500,
"success": false,
"error": "Internal Server Error!"
}Authorizations
Your application's unique ID.
Your application's secret key.
Path Parameters
The _id of the WABA account to fetch templates for.
Example:
"60c72b2f9b1d8e001f8a1b2c"
Query Parameters
Search query for template name.
The page number for pagination.
The number of items to return per page.
Was this page helpful?
⌘I