Templates
List message templates
Protocols: Meta Cloud API
Required scope: messages:write
GET
/
graph
/
whatsapp
/
{version}
/
{wabaId}
/
message_templates
List message templates
curl --request GET \
--url https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": [
{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "<string>",
"status": "<string>",
"components": [
null
],
"quality_score": {
"score": "<string>"
},
"rejected_reason": "<string>",
"previous_category": "<string>"
}
],
"paging": {
"cursors": {
"before": "<string>",
"after": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}Authorizations
Polymorfa organization key (pmfa_ prefix) or project token (pmfa_pt_ prefix). Client tokens are not accepted by Graph operations.
Path Parameters
Specifies version for this path parameter.
Example:
"v21.0"
Identifier for the waba.
Example:
"200000000000001"
⌘I
List message templates
curl --request GET \
--url https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.polymorfa.com/graph/whatsapp/{version}/{wabaId}/message_templates"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}false{
"data": [
{
"id": "<string>",
"name": "<string>",
"language": "<string>",
"category": "<string>",
"status": "<string>",
"components": [
null
],
"quality_score": {
"score": "<string>"
},
"rejected_reason": "<string>",
"previous_category": "<string>"
}
],
"paging": {
"cursors": {
"before": "<string>",
"after": "<string>"
}
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": 123,
"fbtrace_id": "<string>",
"error_subcode": 123,
"error_data": "<unknown>"
}
}