Consultar webhook global
curl --request GET \
--url https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"webhook": {
"url": "https://exemplo.com/webhook-global",
"events": [
"messages",
"smb_message_echoes"
],
"enabled": true,
"secret": "whsec_xxx"
}
}Webhook global
Consultar webhook global
Retorna o webhook global da conta, que recebe os eventos de todos os canais.
GET
/
channels
/
whatsapp
/
global-webhook
Consultar webhook global
curl --request GET \
--url https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://cloud.datafyapi.com.br/channels/whatsapp/global-webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"webhook": {
"url": "https://exemplo.com/webhook-global",
"events": [
"messages",
"smb_message_echoes"
],
"enabled": true,
"secret": "whsec_xxx"
}
}Resposta
| Campo | Descrição |
|---|---|
webhook.url | URL que recebe os eventos de todos os canais |
webhook.events | Eventos que o webhook recebe |
webhook.enabled | Indica se o webhook está ativo |
webhook.secret | Secret usado na assinatura das entregas deste webhook |
{ "webhook": null }.