All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
chooseWhichEventsToSubscribeTo | PUT /v3/applications/settings/webhook | Choose which events to subscribe to |
retrieveListOfSubscribedEvents | GET /v3/applications/settings/webhook | Retrieve a list of subscribed events |
ChooseWhichEventsToSubscribeToResponse chooseWhichEventsToSubscribeTo()
Choose which events to subscribe to Chooses which events for your webhook server to receive payloads for. By subscribing to specific events based on your own needs, you can control the number of HTTP requests to your webhook server. https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks#2-choose-which-events-to-subscribe-to
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.WebhookApi(configuration);
let body:Sendbird.WebhookApiChooseWhichEventsToSubscribeToRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// ChooseWhichEventsToSubscribeToData (optional)
chooseWhichEventsToSubscribeToData: {
enabled: true,
url: "url_example",
includeMembers: true,
enabledEvents: [
"enabledEvents_example",
],
},
};
apiInstance.chooseWhichEventsToSubscribeTo(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
chooseWhichEventsToSubscribeToData | ChooseWhichEventsToSubscribeToData | ||
apiToken | [string] | (optional) defaults to undefined |
ChooseWhichEventsToSubscribeToResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RetrieveListOfSubscribedEventsResponse retrieveListOfSubscribedEvents()
Retrieve a list of subscribed events Retrieves a list of events for your webhook server to receive payloads for. https://sendbird.com/docs/chat/v3/platform-api/guides/webhooks#2-retrieve-a-list-of-subscribed-events ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.WebhookApi(configuration);
let body:Sendbird.WebhookApiRetrieveListOfSubscribedEventsRequest = {
// string (optional)
apiToken: "{{API_TOKEN}}",
// boolean (optional)
displayAllWebhookCategories: true,
};
apiInstance.retrieveListOfSubscribedEvents(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
apiToken | [string] | (optional) defaults to undefined | |
displayAllWebhookCategories | [boolean] | (optional) defaults to undefined |
RetrieveListOfSubscribedEventsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]