Consultar webhook global
curl --request GET \
--url https://cloud.datafyapi.com.br/channels/instagram/global-webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.datafyapi.com.br/channels/instagram/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/instagram/global-webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"webhook": {
"url": "https://exemplo.com/webhook-global",
"events": [
"messages"
],
"enabled": true,
"secret": "whsec_xxx"
}
}Webhook global
Consultar webhook global
Retorna o webhook global da conta, que recebe os eventos de todos os canais de Instagram.
GET
/
channels
/
instagram
/
global-webhook
Consultar webhook global
curl --request GET \
--url https://cloud.datafyapi.com.br/channels/instagram/global-webhook \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://cloud.datafyapi.com.br/channels/instagram/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/instagram/global-webhook"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"webhook": {
"url": "https://exemplo.com/webhook-global",
"events": [
"messages"
],
"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 }.Autorizações
Token de conta gerado no painel da Datafy, na aba Parceiros. Formato: sk_acct_xxx. Diferente do token de canal (sk_live_).
Resposta
Webhook global da conta.
Webhook global da conta, ou null quando não configurado.
Show child attributes
Show child attributes