TypeScript SDK
import { NinjaChat } from "@ninjachat/sdk";
const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });
const endpoints = await client.webhooks.list();
console.log(endpoints);import os
from ninjachat import NinjaChat
client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"])
endpoints = client.webhooks.list()
print(endpoints)curl --request GET \
--url https://www.ninjachat.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>'{
"endpoints": [
{
"id": "<string>",
"url": "<string>",
"events": [
"video.completed"
],
"secret_hint": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}Webhooks
List webhooks
List HTTPS endpoints registered for video completion and spend-alert callbacks. Console: https://www.ninjachat.ai/developers/webhooks
GET
/
webhooks
TypeScript SDK
import { NinjaChat } from "@ninjachat/sdk";
const client = new NinjaChat({ apiKey: process.env.NINJACHAT_API_KEY! });
const endpoints = await client.webhooks.list();
console.log(endpoints);import os
from ninjachat import NinjaChat
client = NinjaChat(api_key=os.environ["NINJACHAT_API_KEY"])
endpoints = client.webhooks.list()
print(endpoints)curl --request GET \
--url https://www.ninjachat.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>'{
"endpoints": [
{
"id": "<string>",
"url": "<string>",
"events": [
"video.completed"
],
"secret_hint": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}{
"error": {
"message": "<string>",
"type": "<string>",
"code": "<string>",
"param": "<string>"
}
}