All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
ocCancelTheRegistrationOfOperators | DELETE /v3/open_channels/{channel_url}/operators | Cancel the registration of operators |
ocCreateChannel | POST /v3/open_channels | Create a channel |
ocDeleteChannelByUrl | DELETE /v3/open_channels/{channel_url} | Delete a channel |
ocListChannels | GET /v3/open_channels | List channels |
ocListOperators | GET /v3/open_channels/{channel_url}/operators | List operators |
ocListParticipants | GET /v3/open_channels/{channel_url}/participants | List participants |
ocRegisterOperators | POST /v3/open_channels/{channel_url}/operators | Register operators |
ocUpdateChannelByUrl | PUT /v3/open_channels/{channel_url} | Update a channel |
ocViewChannelByUrl | GET /v3/open_channels/{channel_url} | View a channel |
ocCancelTheRegistrationOfOperators(channelUrl).operatorIds(operatorIds).apiToken(apiToken).deleteAll(deleteAll).execute();
Cancel the registration of operators
Cancels the registration of operators from an open channel but leave them as participants.
https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-cancel-the-registration-of-operators
channel_url
Type: string
Description: Specifies the URL of the channel to cancel the registration of operators.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
List<String> operatorIds = Arrays.asList(); // List<String> |
String apiToken = "{{API_TOKEN}}"; // String |
Boolean deleteAll = true; // Boolean |
try {
api.ocCancelTheRegistrationOfOperators(channelUrl)
.operatorIds(operatorIds)
.apiToken(apiToken)
.deleteAll(deleteAll)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocCancelTheRegistrationOfOperators");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
operatorIds | List<String> | ||
apiToken | String | [optional] | |
deleteAll | Boolean | [optional] |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdOpenChannel ocCreateChannel().apiToken(apiToken).ocCreateChannelData(ocCreateChannelData).execute();
Create a channel
Creates an open channel.
Note: Classic open channels created before the deprecation date of March 2021 will maintain their original form and functions. However, new applications created after December 15, 2020, will be able to create dynamic partitioning open channels only.
https://sendbird.com/docs/chat/v3/platform-api/guides/open-channel#2-create-a-channel
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
OcCreateChannelData ocCreateChannelData = new OcCreateChannelData(); // OcCreateChannelData |
try {
SendBirdOpenChannel result = api.ocCreateChannel()
.apiToken(apiToken)
.ocCreateChannelData(ocCreateChannelData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocCreateChannel");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | [optional] | |
ocCreateChannelData | OcCreateChannelData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
OcDeleteChannelByUrl200Response ocDeleteChannelByUrl(channelUrl).apiToken(apiToken).execute();
Delete a channel
Deletes an open channel.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
OcDeleteChannelByUrl200Response result = api.ocDeleteChannelByUrl(channelUrl)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocDeleteChannelByUrl");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] |
OcDeleteChannelByUrl200Response
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
OcListChannelsResponse ocListChannels().apiToken(apiToken).token(token).limit(limit).customTypes(customTypes).nameContains(nameContains).urlContains(urlContains).showFrozen(showFrozen).showMetadata(showMetadata).customType(customType).execute();
List channels
Retrieves a list of open channels. You can query the list using various parameters.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
String token = "token_example"; // String |
Integer limit = 56; // Integer |
String customTypes = "customTypes_example"; // String |
String nameContains = "nameContains_example"; // String |
String urlContains = "urlContains_example"; // String |
Boolean showFrozen = true; // Boolean |
Boolean showMetadata = true; // Boolean |
String customType = "customType_example"; // String |
try {
OcListChannelsResponse result = api.ocListChannels()
.apiToken(apiToken)
.token(token)
.limit(limit)
.customTypes(customTypes)
.nameContains(nameContains)
.urlContains(urlContains)
.showFrozen(showFrozen)
.showMetadata(showMetadata)
.customType(customType)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocListChannels");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
apiToken | String | [optional] | |
token | String | [optional] | |
limit | Integer | [optional] | |
customTypes | String | [optional] | |
nameContains | String | [optional] | |
urlContains | String | [optional] | |
showFrozen | Boolean | [optional] | |
showMetadata | Boolean | [optional] | |
customType | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
OcListOperatorsResponse ocListOperators(channelUrl).apiToken(apiToken).token(token).limit(limit).execute();
List operators
Retrieves a list of operators of an open channel.
channel_url
Type: string
Description: Specifies the URL of the channel to retrieve a list of operators.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
String token = "token_example"; // String |
Integer limit = 56; // Integer |
try {
OcListOperatorsResponse result = api.ocListOperators(channelUrl)
.apiToken(apiToken)
.token(token)
.limit(limit)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocListOperators");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] | |
token | String | [optional] | |
limit | Integer | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
OcListParticipantsResponse ocListParticipants(channelUrl).apiToken(apiToken).token(token).limit(limit).execute();
List participants
Retrieves a list of the participants of an open channel. A participant refers to a user who has entered the open channel and is currently online.
channel_url
Type: string
Description: Specifies the URL of the channel to retrieve a list of participants in.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
String token = "token_example"; // String |
Integer limit = 56; // Integer |
try {
OcListParticipantsResponse result = api.ocListParticipants(channelUrl)
.apiToken(apiToken)
.token(token)
.limit(limit)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocListParticipants");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] | |
token | String | [optional] | |
limit | Integer | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
OcDeleteChannelByUrl200Response ocRegisterOperators(channelUrl).apiToken(apiToken).ocRegisterOperatorsData(ocRegisterOperatorsData).execute();
Register operators
Registers one or more operators to an open channel.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
OcRegisterOperatorsData ocRegisterOperatorsData = new OcRegisterOperatorsData(); // OcRegisterOperatorsData |
try {
OcDeleteChannelByUrl200Response result = api.ocRegisterOperators(channelUrl)
.apiToken(apiToken)
.ocRegisterOperatorsData(ocRegisterOperatorsData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocRegisterOperators");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] | |
ocRegisterOperatorsData | OcRegisterOperatorsData | [optional] |
OcDeleteChannelByUrl200Response
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdOpenChannel ocUpdateChannelByUrl(channelUrl).apiToken(apiToken).ocUpdateChannelByUrlData(ocUpdateChannelByUrlData).execute();
Update a channel
Updates information on an open channel.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
OcUpdateChannelByUrlData ocUpdateChannelByUrlData = new OcUpdateChannelByUrlData(); // OcUpdateChannelByUrlData |
try {
SendBirdOpenChannel result = api.ocUpdateChannelByUrl(channelUrl)
.apiToken(apiToken)
.ocUpdateChannelByUrlData(ocUpdateChannelByUrlData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocUpdateChannelByUrl");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] | |
ocUpdateChannelByUrlData | OcUpdateChannelByUrlData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdOpenChannel ocViewChannelByUrl(channelUrl).apiToken(apiToken).execute();
View a channel
Retrieves information on a specific open channel.
// Import classes:
import org.sendbird.client.ApiClient;
import org.sendbird.client.ApiException;
import org.sendbird.client.Configuration;
import org.sendbird.client.model.*;
import org.sendbird.client.api.OpenChannelApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
OpenChannelApi apiInstance = new OpenChannelApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
SendBirdOpenChannel result = api.ocViewChannelByUrl(channelUrl)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling OpenChannelApi#ocViewChannelByUrl");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
channelUrl | String | ||
apiToken | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |