Enviar un mensaje con el formato de Meta
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>"
}Referencia API
Enviar un mensaje con el formato de Meta
Enviar un mensaje con el formato de Meta
POST
/
v
{graphVersion}
/
{phoneNumberId}
/
messages
Enviar un mensaje con el formato de Meta
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>"
}Autorizaciones
bearerApiKeyheaderApiKey
Clave API de la cuenta.
Parámetros de ruta
Cualquier N.N. Se ignora: Graph utiliza META_API_VERSION del gateway.
Pattern:
^\d+\.\d+$ID numérico de Graph de Meta.
Pattern:
^\d+$¿Esta página le ayudó?