GET /events
List all events belonging to the webhook. A filter can be specified in order to get more specific results.
Optional Parameters
Parameter | Type | Description |
---|---|---|
status | string | The event status (failed, success) |
page | string | The page number |
items | string | The number of items per page |
subscriptions | string[] | Comma separated values of the events to subscribe on this webhook (e.g message_created ) |
Example Request
- cURL
- Node
- Ruby
- Go
- PHP
- Python
curl -X GET "https://api.callbell.eu/v1/webhooks/events" \
-H "Authorization: Bearer test_gshuPaZoeEG6ovbc8M79w0QyM" \
-H "Content-Type: application/json"
import axios from 'axios';
const response = await axios.get('https://api.callbell.eu/v1/webhooks/events', {
headers: {
'Authorization': 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type': 'application/json'
}
});
require 'net/http'
uri = URI('https://api.callbell.eu/v1/webhooks/events')
req = Net::HTTP::Get.new(uri)
req.content_type = 'application/json'
req['Authorization'] = 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM'
req_options = {
use_ssl: uri.scheme == 'https'
}
res = Net::HTTP.start(uri.hostname, uri.port, req_options) do |http|
http.request(req)
end
package main
import (
"fmt"
"io"
"log"
"net/http"
)
func main() {
client := &http.Client{}
req, err := http.NewRequest("GET", "https://api.callbell.eu/v1/webhooks/events", nil)
if err != nil {
log.Fatal(err)
}
req.Header.Set("Authorization", "Bearer test_gshuPaZoeEG6ovbc8M79w0QyM")
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.callbell.eu/v1/webhooks/events');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type: application/json',
]);
$response = curl_exec($ch);
curl_close($ch);
import requests
headers = {
'Authorization': 'Bearer test_gshuPaZoeEG6ovbc8M79w0QyM',
'Content-Type': 'application/json',
}
response = requests.get('https://api.callbell.eu/v1/webhooks/events', headers=headers)
Response
Parameter | Type | Description |
---|---|---|
webhook_events | WebhookEvent | List of webhook events. |
Example Response
response.json
{
"webhook_events": [
{
"event": "message_created",
"payload": "message_object",
"response": {
"body": {},
"code": 200,
"headers": {}
},
"success": true,
"createdAt": "2022-11-08T15:41:49Z"
},
{
"event": "message_created",
"payload": "message_object",
"response": {
"body": {},
"code": 200,
"headers": {}
},
"success": true,
"createdAt": "2022-11-08T14:52:31Z"
},
{
"event": "message_created",
"payload": "contact_object",
"response": {
"body": {},
"code": 200,
"headers": {}
},
"success": true,
"createdAt": "2022-11-08T14:51:51Z"
}
],
"meta": {
"page": 1,
"pages": 2
}
}