All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
banFromChannelsWithCustomChannelTypes | POST /v3/users/{user_id}/banned_channel_custom_types | Ban from channels with custom channel types |
blockUser | POST /v3/users/{user_id}/block | Block a user |
gcBanUser | POST /v3/group_channels/{channel_url}/ban | Ban a user |
gcFreezeChannel | PUT /v3/group_channels/{channel_url}/freeze | Freeze a channel |
gcListBannedUsers | GET /v3/group_channels/{channel_url}/ban | List banned users |
gcListMutedUsers | GET /v3/group_channels/{channel_url}/mute | List muted users |
gcMuteUser | POST /v3/group_channels/{channel_url}/mute | Mute a user |
gcUnbanUserById | DELETE /v3/group_channels/{channel_url}/ban/{banned_user_id} | Unban a user |
gcUnmuteUserById | DELETE /v3/group_channels/{channel_url}/mute/{muted_user_id} | Unmute a user |
gcUpdateBanById | PUT /v3/group_channels/{channel_url}/ban/{banned_user_id} | Update a ban |
gcViewBanById | GET /v3/group_channels/{channel_url}/ban/{banned_user_id} | View a ban |
gcViewMuteById | GET /v3/group_channels/{channel_url}/mute/{muted_user_id} | View a mute |
listBannedChannels | GET /v3/users/{user_id}/ban | List banned channels |
listBlockedUsers | GET /v3/users/{user_id}/block | List blocked users |
listMutedChannels | GET /v3/users/{user_id}/mute | List muted channels |
muteInChannelsWithCustomChannelTypes | POST /v3/users/{user_id}/muted_channel_custom_types | Mute in channels with custom channel types |
ocBanUser | POST /v3/open_channels/{channel_url}/ban | Ban a user |
ocFreezeChannel | PUT /v3/open_channels/{channel_url}/freeze | Freeze a channel |
ocListBannedUsers | GET /v3/open_channels/{channel_url}/ban | List banned users |
ocListMutedUsers | GET /v3/open_channels/{channel_url}/mute | List muted users |
ocMuteUser | POST /v3/open_channels/{channel_url}/mute | Mute a user |
ocUnbanUserById | DELETE /v3/open_channels/{channel_url}/ban/{banned_user_id} | Unban a user |
ocUnmuteUserById | DELETE /v3/open_channels/{channel_url}/mute/{muted_user_id} | Unmute a user |
ocUpdateBanById | PUT /v3/open_channels/{channel_url}/ban/{banned_user_id} | Update a ban |
ocViewBanById | GET /v3/open_channels/{channel_url}/ban/{banned_user_id} | View a ban |
ocViewMuteById | GET /v3/open_channels/{channel_url}/mute/{muted_user_id} | View a mute |
unblockUserById | DELETE /v3/users/{user_id}/block/{target_id} | Unblock a user |
any banFromChannelsWithCustomChannelTypes()
Ban from channels with custom channel types Bans a user from channels with particular custom channel types. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-ban-from-channels-with-custom-channel-types ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiBanFromChannelsWithCustomChannelTypesRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// BanFromChannelsWithCustomChannelTypesData (optional)
banFromChannelsWithCustomChannelTypesData: {
channelCustomTypes: [
"channelCustomTypes_example",
],
},
};
apiInstance.banFromChannelsWithCustomChannelTypes(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
banFromChannelsWithCustomChannelTypesData | BanFromChannelsWithCustomChannelTypesData | ||
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
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]
BlockUserResponse blockUser()
Block a user Allows a user to block another user. A user doesn't receive messages from someone they have blocked anymore. Also, blocking someone doesn't alert them that they have been blocked. Blocked users still can send messages as normal in the channel: however, they can't receive any messages from the users who have blocked them. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-block-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiBlockUserRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// BlockUserData (optional)
blockUserData: {
userId: "userId_example",
targetId: "targetId_example",
userIds: [
"userIds_example",
],
users: [
"users_example",
],
},
};
apiInstance.blockUser(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
blockUserData | BlockUserData | ||
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
BlockUserResponse
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]
GcBanUserResponse gcBanUser()
Ban a user Bans a user from a group channel. A banned user is immediately expelled from a channel and allowed to join the channel again after a set time period. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-ban-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcBanUserRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcBanUserData (optional)
gcBanUserData: {
channelUrl: "channelUrl_example",
userId: "userId_example",
agentId: "agentId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.gcBanUser(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcBanUserData | GcBanUserData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
GcBanUserResponse
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]
SendBirdGroupChannel gcFreezeChannel()
Freeze a channel Freezes or unfreezes a group channel. > Note: Only users designated as channel operators are allowed to talk when a channel is frozen. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-freeze-a-channel ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcFreezeChannelRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcFreezeChannelData (optional)
gcFreezeChannelData: {
channelUrl: "channelUrl_example",
freeze: true,
},
};
apiInstance.gcFreezeChannel(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcFreezeChannelData | GcFreezeChannelData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdGroupChannel
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]
GcListBannedUsersResponse gcListBannedUsers()
List banned users Retrieves a list of the banned users from a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-list-banned-users ---------------------------- channel_url
Type: string Description: Specifies the URL of the channel where to retrieve a list of banned users.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcListBannedUsersRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.gcListBannedUsers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
GcListBannedUsersResponse
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]
GcListMutedUsersResponse gcListMutedUsers()
List muted users Retrieves a list of the muted users in a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-list-muted-users ---------------------------- channel_url
Type: string Description: Specifies the URL of the channel to retrieve a list of muted users.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcListMutedUsersRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.gcListMutedUsers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
GcListMutedUsersResponse
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]
SendBirdGroupChannel gcMuteUser()
Mute a user Mutes a user in a group channel. A muted user remains in the channel and is allowed to view the messages, but can't send any messages until unmuted. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-mute-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcMuteUserRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcMuteUserData (optional)
gcMuteUserData: {
channelUrl: "channelUrl_example",
userId: "userId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.gcMuteUser(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcMuteUserData | GcMuteUserData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdGroupChannel
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]
OcDeleteChannelByUrl200Response gcUnbanUserById()
Unban a user Unbans a user from a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-unban-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcUnbanUserByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.gcUnbanUserById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcDeleteChannelByUrl200Response
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]
OcDeleteChannelByUrl200Response gcUnmuteUserById()
Unmute a user Unmutes a user within a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-unmute-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcUnmuteUserByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
mutedUserId: "muted_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.gcUnmuteUserById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
mutedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcDeleteChannelByUrl200Response
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]
GcUpdateBanByIdResponse gcUpdateBanById()
Update a ban Updates details of a ban imposed on a user. You can change the length of the ban with this action, and also provide an updated description. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-update-a-ban ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcUpdateBanByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// GcUpdateBanByIdData (optional)
gcUpdateBanByIdData: {
channelUrl: "channelUrl_example",
bannedUserId: "bannedUserId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.gcUpdateBanById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
gcUpdateBanByIdData | GcUpdateBanByIdData | ||
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
GcUpdateBanByIdResponse
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]
GcViewBanByIdResponse gcViewBanById()
View a ban Retrieves details of a ban imposed on a user. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-view-a-ban ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcViewBanByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.gcViewBanById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
GcViewBanByIdResponse
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]
GcViewMuteByIdResponse gcViewMuteById()
View a mute Checks if a user is muted in a group channel. https://sendbird.com/docs/chat/v3/platform-api/guides/group-channel#2-view-a-mute ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiGcViewMuteByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
mutedUserId: "muted_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.gcViewMuteById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
mutedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
GcViewMuteByIdResponse
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]
ListBannedChannelsResponse listBannedChannels()
List banned channels Retrieves a list of open and group channels with additional information where a user is banned. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-banned-channels ---------------------------- user_id
Type: string Description: Specifies the unique ID of the target user.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiListBannedChannelsRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.listBannedChannels(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
ListBannedChannelsResponse
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]
ListBlockedUsersResponse listBlockedUsers()
List blocked users Retrieves a list of other users that a user has blocked. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-blocked-users ---------------------------- user_id
Type: string Description: Specifies the unique ID of the target user.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiListBlockedUsersRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
// string (optional)
userIds: "user_ids_example",
// string (optional)
metadatakey: "metadatakey_example",
// string (optional)
metadatavaluesIn: "metadatavalues_in_example",
};
apiInstance.listBlockedUsers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined | |
userIds | [string] | (optional) defaults to undefined | |
metadatakey | [string] | (optional) defaults to undefined | |
metadatavaluesIn | [string] | (optional) defaults to undefined |
ListBlockedUsersResponse
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]
ListMutedChannelsResponse listMutedChannels()
List muted channels Retrieves a list of open and group channels with additional information where a user is muted. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-list-muted-channels ---------------------------- user_id
Type: string Description: Specifies the unique ID of the target user.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiListMutedChannelsRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.listMutedChannels(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
ListMutedChannelsResponse
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]
any muteInChannelsWithCustomChannelTypes()
Mute in channels with custom channel types Mutes a user in channels with particular custom channel types. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-mute-in-channels-with-custom-channel-types ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiMuteInChannelsWithCustomChannelTypesRequest = {
// string
userId: "user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// MuteInChannelsWithCustomChannelTypesData (optional)
muteInChannelsWithCustomChannelTypesData: {
channelCustomTypes: [
"channelCustomTypes_example",
],
},
};
apiInstance.muteInChannelsWithCustomChannelTypes(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
muteInChannelsWithCustomChannelTypesData | MuteInChannelsWithCustomChannelTypesData | ||
userId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
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]
OcBanUserResponse ocBanUser()
Ban a user Bans a user from an open channel. A banned user is immediately expelled from a channel and allowed to participate in the channel again after a set time period. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-ban-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcBanUserRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// OcBanUserData (optional)
ocBanUserData: {
channelUrl: "channelUrl_example",
userId: "userId_example",
agentId: "agentId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.ocBanUser(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
ocBanUserData | OcBanUserData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcBanUserResponse
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]
SendBirdOpenChannel ocFreezeChannel()
Freeze a channel Freezes or unfreezes an open channel. > Note: Only users designated as channel operators are allowed to talk when a channel is frozen. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-freeze-a-channel ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcFreezeChannelRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// OcFreezeChannelData (optional)
ocFreezeChannelData: {
channelUrl: "channelUrl_example",
freeze: true,
},
};
apiInstance.ocFreezeChannel(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
ocFreezeChannelData | OcFreezeChannelData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdOpenChannel
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]
OcListBannedUsersResponse ocListBannedUsers()
List banned users Retrieves a list of banned users from a specific open channel. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-list-banned-users ---------------------------- channel_url
Type: string Description: Specifies the URL of the channel where to retrieve a list of banned users.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcListBannedUsersRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.ocListBannedUsers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
OcListBannedUsersResponse
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]
OcListMutedUsersResponse ocListMutedUsers()
List muted users Retrieves a list of muted users in the channel. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-list-muted-users ---------------------------- channel_url
Type: string Description: Specifies the URL of the channel to retrieve a list of muted users.
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcListMutedUsersRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// string (optional)
token: "token_example",
// number (optional)
limit: 1,
};
apiInstance.ocListMutedUsers(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined | |
token | [string] | (optional) defaults to undefined | |
limit | [number] | (optional) defaults to undefined |
OcListMutedUsersResponse
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]
SendBirdOpenChannel ocMuteUser()
Mute a user Mutes a user in the channel. A muted user remains in the channel and is allowed to view the messages, but can't send any messages until unmuted. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-mute-a-user
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcMuteUserRequest = {
// string
channelUrl: "channel_url_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// OcMuteUserData (optional)
ocMuteUserData: {
userId: "userId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.ocMuteUser(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
ocMuteUserData | OcMuteUserData | ||
channelUrl | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
SendBirdOpenChannel
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]
OcDeleteChannelByUrl200Response ocUnbanUserById()
Unban a user Unbans a user from an open channel. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-unban-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcUnbanUserByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.ocUnbanUserById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcDeleteChannelByUrl200Response
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]
OcDeleteChannelByUrl200Response ocUnmuteUserById()
Unmute a user Unmutes a user from an open channel. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-unmute-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcUnmuteUserByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
mutedUserId: "muted_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.ocUnmuteUserById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
mutedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcDeleteChannelByUrl200Response
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]
OcUpdateBanByIdResponse ocUpdateBanById()
Update a ban Updates details of a ban imposed on a user. You can change the length of a ban with this action, and also provide an updated description. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-update-a-ban ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcUpdateBanByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
// OcUpdateBanByIdData (optional)
ocUpdateBanByIdData: {
channelUrl: "channelUrl_example",
bannedUserId: "bannedUserId_example",
seconds: 1,
description: "description_example",
},
};
apiInstance.ocUpdateBanById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
ocUpdateBanByIdData | OcUpdateBanByIdData | ||
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcUpdateBanByIdResponse
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]
OcViewBanByIdResponse ocViewBanById()
View a ban Retrieves details of a ban imposed on a user. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-view-a-ban ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcViewBanByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
bannedUserId: "banned_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.ocViewBanById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
bannedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcViewBanByIdResponse
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]
OcViewMuteByIdResponse ocViewMuteById()
View a mute Checks if a user is muted in an open channel. https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-view-a-mute ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiOcViewMuteByIdRequest = {
// string
channelUrl: "channel_url_example",
// string
mutedUserId: "muted_user_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.ocViewMuteById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | [string] | defaults to undefined | |
mutedUserId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
OcViewMuteByIdResponse
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]
any unblockUserById()
Unblock a user Unblocks the user. https://sendbird.com/docs/chat/v3/platform-api/guides/user#2-unblock-a-user ----------------------------
import { Sendbird } from 'sendbird-platform-sdk';
import * as fs from 'fs';
const configuration = Sendbird.createConfiguration();
const apiInstance = new Sendbird.ModerationApi(configuration);
let body:Sendbird.ModerationApiUnblockUserByIdRequest = {
// string
userId: "user_id_example",
// string
targetId: "target_id_example",
// string (optional)
apiToken: "{{API_TOKEN}}",
};
apiInstance.unblockUserById(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
userId | [string] | defaults to undefined | |
targetId | [string] | defaults to undefined | |
apiToken | [string] | (optional) defaults to undefined |
any
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]