Send a message with Meta's request and response
curl --request POST \
--url https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"messaging_product": "whatsapp",
"contacts": [
{
"input": "<string>",
"wa_id": "<string>"
}
],
"messages": [
{
"id": "<string>",
"message_status": "<string>"
}
]
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}API reference
Send a message with Meta's request and response
Send a message with Meta’s request and response
POST
/
v
{graphVersion}
/
{phoneNumberId}
/
messages
Send a message with Meta's request and response
curl --request POST \
--url https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages \
--header 'Authorization: Bearer <token>'const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.watahub.dev/v{graphVersion}/{phoneNumberId}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text){
"messaging_product": "whatsapp",
"contacts": [
{
"input": "<string>",
"wa_id": "<string>"
}
],
"messages": [
{
"id": "<string>",
"message_status": "<string>"
}
]
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}{
"error": "<string>",
"fields": [
"<string>"
],
"requestId": "<string>"
}Authorizations
bearerApiKeyheaderApiKey
Tenant API key.
Path Parameters
Any N.N. Ignored: Graph is called with the gateway's META_API_VERSION.
Pattern:
^\d+\.\d+$Numeric Meta Graph ID.
Pattern:
^\d+$Was this page helpful?