List message templates
curl --request GET \
--url https://apichatcore.beem.africa/v1/message-templates/list \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apichatcore.beem.africa/v1/message-templates/list"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://apichatcore.beem.africa/v1/message-templates/list', 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://apichatcore.beem.africa/v1/message-templates/list",
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: Basic <encoded-value>"
],
]);
$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://apichatcore.beem.africa/v1/message-templates/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apichatcore.beem.africa/v1/message-templates/list")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apichatcore.beem.africa/v1/message-templates/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 10913,
"template_id": "fbce0d08-4ecb-456c-9c13-a709767396531",
"facebook_template_id": "107484765349667",
"type": "TEXT",
"category": "AUTHENTICATION",
"name": "auth_template_api1",
"botId": "9a87df7c-0fcd-42fb-9a69-66c58ff66a92",
"status": "",
"language": "en_US",
"content": "{{1}} is your verification code. For your security, do not share this code.",
"mediaUrl": null,
"mimeType": null,
"buttons": [
{
"type": "OTP",
"otp_type": "COPY_CODE",
"text": "COPY OTP"
}
],
"footer": "The code will expire in 1min",
"header": null,
"metadata": [
{
"failed": true,
"pending": true,
"approved": false,
"rejected": false
}
],
"createdAt": "2024-09-05T09:01:22.000Z",
"updatedAt": "2024-09-05T10:48:53.000Z"
}
],
"pagination": {
"totalItems": 150,
"currentPage": 1,
"totalPages": 6
}
}{
"code": 120,
"message": "Invalid Authentication Parameters"
}MOJA Broadcast API
List message templates
Fetch WhatsApp message templates for the authenticated account.
GET
/
v1
/
message-templates
/
list
List message templates
curl --request GET \
--url https://apichatcore.beem.africa/v1/message-templates/list \
--header 'Authorization: Basic <encoded-value>'import requests
url = "https://apichatcore.beem.africa/v1/message-templates/list"
headers = {"Authorization": "Basic <encoded-value>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Basic <encoded-value>'}};
fetch('https://apichatcore.beem.africa/v1/message-templates/list', 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://apichatcore.beem.africa/v1/message-templates/list",
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: Basic <encoded-value>"
],
]);
$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://apichatcore.beem.africa/v1/message-templates/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Basic <encoded-value>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://apichatcore.beem.africa/v1/message-templates/list")
.header("Authorization", "Basic <encoded-value>")
.asString();require 'uri'
require 'net/http'
url = URI("https://apichatcore.beem.africa/v1/message-templates/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Basic <encoded-value>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": 10913,
"template_id": "fbce0d08-4ecb-456c-9c13-a709767396531",
"facebook_template_id": "107484765349667",
"type": "TEXT",
"category": "AUTHENTICATION",
"name": "auth_template_api1",
"botId": "9a87df7c-0fcd-42fb-9a69-66c58ff66a92",
"status": "",
"language": "en_US",
"content": "{{1}} is your verification code. For your security, do not share this code.",
"mediaUrl": null,
"mimeType": null,
"buttons": [
{
"type": "OTP",
"otp_type": "COPY_CODE",
"text": "COPY OTP"
}
],
"footer": "The code will expire in 1min",
"header": null,
"metadata": [
{
"failed": true,
"pending": true,
"approved": false,
"rejected": false
}
],
"createdAt": "2024-09-05T09:01:22.000Z",
"updatedAt": "2024-09-05T10:48:53.000Z"
}
],
"pagination": {
"totalItems": 150,
"currentPage": 1,
"totalPages": 6
}
}{
"code": 120,
"message": "Invalid Authentication Parameters"
}Authorizations
basicAuthaccessToken
Beem API credentials: API key as username, API secret as password.
Query Parameters
Required range:
x >= 1Required range:
x >= 1Available options:
AUTHENTICATION, UTILITY, MARKETING Available options:
pending, enabled, rejected, failed ⌘I
