Fetch all Subscriptions
curl --request GET \
--url https://api.dojah.io/api/v1/webhook/fetch \
--header 'AppId: <appid>' \
--header 'Authorization: <api-key>'import requests
url = "https://api.dojah.io/api/v1/webhook/fetch"
headers = {
"AppId": "<appid>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {AppId: '<appid>', Authorization: '<api-key>'}};
fetch('https://api.dojah.io/api/v1/webhook/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dojah.io/api/v1/webhook/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"AppId: <appid>",
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dojah.io/api/v1/webhook/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("AppId", "<appid>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dojah.io/api/v1/webhook/fetch")
.header("AppId", "<appid>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dojah.io/api/v1/webhook/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["AppId"] = '<appid>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"entity": {
"webhooks": [
{
"app_id": "5f3a4c693a7ea9003e4067e6",
"endpoint": "https://webhook.site/bc33b503-bf38-4b65-88e5-349d86378d4a",
"environment": "live",
"service": "sms",
"confirmation_status": null,
"date_created": "2023-03-18T06:45:37.293746+01:00",
"date_updated": "2023-03-18T06:45:37.293806+01:00",
"medium": "version 3"
}
],
"total": 1,
"previous_page": "",
"next_page": "",
"total_pages": 1,
"current_page": 1
}
}
{
"error": "Invalid request parameters"
}
{
"error": "App Couldn't be Validated"
}
Fetch all Subscriptions
An endpoint that allows you to fetch all subscriptions
GET
/
api
/
v1
/
webhook
/
fetch
Fetch all Subscriptions
curl --request GET \
--url https://api.dojah.io/api/v1/webhook/fetch \
--header 'AppId: <appid>' \
--header 'Authorization: <api-key>'import requests
url = "https://api.dojah.io/api/v1/webhook/fetch"
headers = {
"AppId": "<appid>",
"Authorization": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {AppId: '<appid>', Authorization: '<api-key>'}};
fetch('https://api.dojah.io/api/v1/webhook/fetch', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dojah.io/api/v1/webhook/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"AppId: <appid>",
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dojah.io/api/v1/webhook/fetch"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("AppId", "<appid>")
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dojah.io/api/v1/webhook/fetch")
.header("AppId", "<appid>")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dojah.io/api/v1/webhook/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["AppId"] = '<appid>'
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"entity": {
"webhooks": [
{
"app_id": "5f3a4c693a7ea9003e4067e6",
"endpoint": "https://webhook.site/bc33b503-bf38-4b65-88e5-349d86378d4a",
"environment": "live",
"service": "sms",
"confirmation_status": null,
"date_created": "2023-03-18T06:45:37.293746+01:00",
"date_updated": "2023-03-18T06:45:37.293806+01:00",
"medium": "version 3"
}
],
"total": 1,
"previous_page": "",
"next_page": "",
"total_pages": 1,
"current_page": 1
}
}
{
"error": "Invalid request parameters"
}
{
"error": "App Couldn't be Validated"
}
Application ID from dashboard
RESPONSES
json
{
"entity": {
"webhooks": [
{
"app_id": "5f3a4c693a7ea9003e4067e6",
"endpoint": "https://webhook.site/bc33b503-bf38-4b65-88e5-349d86378d4a",
"environment": "live",
"service": "sms",
"confirmation_status": null,
"date_created": "2023-03-18T06:45:37.293746+01:00",
"date_updated": "2023-03-18T06:45:37.293806+01:00",
"medium": "version 3"
}
],
"total": 1,
"previous_page": "",
"next_page": "",
"total_pages": 1,
"current_page": 1
}
}
{
"error": "Invalid request parameters"
}
{
"error": "App Couldn't be Validated"
}
Was this page helpful?
⌘I