Consultar webhook
curl --request GET \
--url https://api.notifique.dev/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifique.dev/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/webhooks/{id}"
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.notifique.dev/v1/webhooks/{id}"
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))
}{
"success": true,
"data": {
"id": "clwh_01HABC...",
"name": "Meu webhook",
"url": "https://api.seudominio.com/receive",
"events": [
"message.sent"
],
"instanceIds": [],
"enabled": true
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope webhooks:manage",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Not Found",
"message": "Webhook not found",
"code": "NOT_FOUND"
}Webhooks
Consultar webhook
GET
/
v1
/
webhooks
/
{id}
Consultar webhook
curl --request GET \
--url https://api.notifique.dev/v1/webhooks/{id} \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.notifique.dev/v1/webhooks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.notifique.dev/v1/webhooks/{id}"
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.notifique.dev/v1/webhooks/{id}"
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))
}{
"success": true,
"data": {
"id": "clwh_01HABC...",
"name": "Meu webhook",
"url": "https://api.seudominio.com/receive",
"events": [
"message.sent"
],
"instanceIds": [],
"enabled": true
}
}{
"success": false,
"error": "Unauthorized",
"message": "Invalid API key",
"code": "UNAUTHORIZED"
}{
"success": false,
"error": "Forbidden",
"message": "Missing scope webhooks:manage",
"code": "FORBIDDEN"
}{
"success": false,
"error": "Not Found",
"message": "Webhook not found",
"code": "NOT_FOUND"
}Esta página foi útil?

