Test a webhook
Send the newest real event of this webhook to its address now, signed as usual and marked test, and see what your server answered.
Paid plansLive data
POSThttps://api.tvguideapi.com/v1/webhooks/{id}/test
Try itRuns the real call with your key
200 OK
Parameters
| Parameter | In | Type | Required | Description | Example |
|---|---|---|---|---|---|
| id | path | string | required | The webhook id. | wh_3k21 |
Request
curl -X POST -H "Authorization: Bearer $TVG_KEY" \ "https://api.tvguideapi.com/v1/webhooks/wh_3k21/test"
$ch = curl_init("https://api.tvguideapi.com/v1/webhooks/wh_3k21/test");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => ["Authorization: Bearer " . getenv("TVG_KEY")],
]);
$answer = json_decode(curl_exec($ch), true);
const r = await fetch("https://api.tvguideapi.com/v1/webhooks/wh_3k21/test", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.TVG_KEY}` },
});
const { data, meta } = await r.json();
import os, requests
r = requests.post(
"https://api.tvguideapi.com/v1/webhooks/wh_3k21/test",
headers={"Authorization": f"Bearer {os.environ['TVG_KEY']}"},
)
data = r.json()["data"]
Sample response
{
"data": {
"id": "wh_3k21",
"type": "event.starting",
"http": 200,
"ok": true,
"error": null,
"took_ms": 184
},
"meta": {
"took_ms": 23
}
}