All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
addEmojiCategories | POST /v3/emoji_categories | Add emoji categories |
addEmojis | POST /v3/emojis | Add emojis |
addExtraDataToMessage | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Add extra data to a message |
addReactionToAMessage | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Add a reaction to a message |
deleteEmojiByKey | DELETE /v3/emojis/{emoji_key} | Delete an emoji |
deleteEmojiCategoryById | DELETE /v3/emoji_categories/{emoji_category_id} | Delete an emoji category |
deleteMessageById | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id} | Delete a message |
enableReactions | PUT /v3/applications/settings/reactions | Enable reactions |
gcMarkAllMessagesAsDelivered | PUT /v3/group_channels/{channel_url}/messages/mark_as_delivered | Mark all messages as delivered |
gcMarkAllMessagesAsRead | PUT /v3/group_channels/{channel_url}/messages/mark_as_read | Mark all messages as read |
gcViewNumberOfEachMembersUnreadMessages | GET /v3/group_channels/{channel_url}/messages/unread_count | View number of each member's unread messages |
getEmojiByKey | GET /v3/emojis/{emoji_key} | Get an emoji |
getEmojiCategoryById | GET /v3/emoji_categories/{emoji_category_id} | Get an emoji category |
listAllEmojisAndEmojiCategories | GET /v3/emoji_categories | List all emojis and emoji categories |
listAnnouncements | GET /v3/announcements | List announcements |
listEmojis | GET /v3/emojis | List emojis |
listMessages | GET /v3/{channel_type}/{channel_url}/messages | List messages |
listReactionsOfMessage | GET /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | List reactions of a message |
migrateMessagesByUrl | POST /v3/migration/{target_channel_url} | Migrate messages |
removeExtraDataFromMessage | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Remove extra data from a message |
removeReactionFromAMessage | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Remove a reaction from a message |
sendMessage | POST /v3/{channel_type}/{channel_url}/messages | Send a message |
translateMessageIntoOtherLanguages | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/translation | Translate a message into other languages |
updateEmojiCategoryUrlById | PUT /v3/emoji_categories/{emoji_category_id} | Update an emoji category URL |
updateEmojiUrlByKey | PUT /v3/emojis/{emoji_key} | Update an emoji URL |
updateExtraDataInMessage | PUT /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Update extra data in a message |
updateMessageById | PUT /v3/{channel_type}/{channel_url}/messages/{message_id} | Update a message |
useDefaultEmojis | PUT /v3/applications/settings/use_default_emoji | Use default emojis |
viewMessageById | GET /v3/{channel_type}/{channel_url}/messages/{message_id} | View a message |
viewTotalNumberOfMessagesInChannel | GET /v3/{channel_type}/{channel_url}/messages/total_count | View total number of messages in a channel |
AddEmojiCategoriesResponse addEmojiCategories().apiToken(apiToken).body(body).execute();
Add emoji categories
Adds a list of one or more new emoji categories to the application.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-add-emoji-categories
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
Object body = null; // Object |
try {
AddEmojiCategoriesResponse result = api.addEmojiCategories()
.apiToken(apiToken)
.body(body)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#addEmojiCategories");
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] | |
body | Object | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
AddEmojisResponse addEmojis().apiToken(apiToken).addEmojisData(addEmojisData).execute();
Add emojis
Adds a list of one or more new emojis to the application.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-add-emojis
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
AddEmojisData addEmojisData = new AddEmojisData(); // AddEmojisData |
try {
AddEmojisResponse result = api.addEmojis()
.apiToken(apiToken)
.addEmojisData(addEmojisData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#addEmojis");
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] | |
addEmojisData | AddEmojisData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
AddExtraDataToMessageResponse addExtraDataToMessage(channelType, channelUrl, messageId).apiToken(apiToken).addExtraDataToMessageData(addExtraDataToMessageData).execute();
Add extra data to a message
Adds one or more key-values items which store additional information for a message.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
AddExtraDataToMessageData addExtraDataToMessageData = new AddExtraDataToMessageData(); // AddExtraDataToMessageData |
try {
AddExtraDataToMessageResponse result = api.addExtraDataToMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.addExtraDataToMessageData(addExtraDataToMessageData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#addExtraDataToMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
addExtraDataToMessageData | AddExtraDataToMessageData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
AddReactionToAMessageResponse addReactionToAMessage(channelType, channelUrl, messageId).apiToken(apiToken).addReactionToAMessageData(addReactionToAMessageData).execute();
Add a reaction to a message
Adds a specific reaction to a message.
Note: Currently, this action is only available in group channels.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
AddReactionToAMessageData addReactionToAMessageData = new AddReactionToAMessageData(); // AddReactionToAMessageData |
try {
AddReactionToAMessageResponse result = api.addReactionToAMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.addReactionToAMessageData(addReactionToAMessageData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#addReactionToAMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
addReactionToAMessageData | AddReactionToAMessageData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
deleteEmojiByKey(emojiKey).apiToken(apiToken).execute();
Delete an emoji
Deletes an emoji from the application.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiKey = "emojiKey_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
api.deleteEmojiByKey(emojiKey)
.apiToken(apiToken)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#deleteEmojiByKey");
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 |
---|---|---|---|
emojiKey | String | ||
apiToken | String | [optional] |
null (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
Object deleteEmojiCategoryById(emojiCategoryId).apiToken(apiToken).execute();
Delete an emoji category
Deletes an emoji category with the specified ID.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiCategoryId = "emojiCategoryId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
Object result = api.deleteEmojiCategoryById(emojiCategoryId)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#deleteEmojiCategoryById");
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 |
---|---|---|---|
emojiCategoryId | String | ||
apiToken | String | [optional] |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
Object deleteMessageById(channelType, channelUrl, messageId).apiToken(apiToken).execute();
Delete a message
Deletes a message from 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
Object result = api.deleteMessageById(channelType, channelUrl, messageId)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#deleteMessageById");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
EnableReactionsResponse enableReactions().apiToken(apiToken).enableReactionsData(enableReactionsData).execute();
Enable reactions
Turn on or off reactions in a Sendbird application.
Note: This action also allows reactions in UIKit.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-enable-reactions
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
EnableReactionsData enableReactionsData = new EnableReactionsData(); // EnableReactionsData |
try {
EnableReactionsResponse result = api.enableReactions()
.apiToken(apiToken)
.enableReactionsData(enableReactionsData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#enableReactions");
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] | |
enableReactionsData | EnableReactionsData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
GcMarkAllMessagesAsDeliveredResponse gcMarkAllMessagesAsDelivered(channelUrl).apiToken(apiToken).gcMarkAllMessagesAsDeliveredData(gcMarkAllMessagesAsDeliveredData).execute();
Mark all messages as delivered
Marks all messages in a group channel as delivered for a given user. This action is only applicable for users in a group 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
GcMarkAllMessagesAsDeliveredData gcMarkAllMessagesAsDeliveredData = new GcMarkAllMessagesAsDeliveredData(); // GcMarkAllMessagesAsDeliveredData |
try {
GcMarkAllMessagesAsDeliveredResponse result = api.gcMarkAllMessagesAsDelivered(channelUrl)
.apiToken(apiToken)
.gcMarkAllMessagesAsDeliveredData(gcMarkAllMessagesAsDeliveredData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#gcMarkAllMessagesAsDelivered");
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] | |
gcMarkAllMessagesAsDeliveredData | GcMarkAllMessagesAsDeliveredData | [optional] |
GcMarkAllMessagesAsDeliveredResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
Object gcMarkAllMessagesAsRead(channelUrl).apiToken(apiToken).gcMarkAllMessagesAsReadData(gcMarkAllMessagesAsReadData).execute();
Mark all messages as read
Marks all messages in a group channel as read for a given user. This action is only applicable for users in a group 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
GcMarkAllMessagesAsReadData gcMarkAllMessagesAsReadData = new GcMarkAllMessagesAsReadData(); // GcMarkAllMessagesAsReadData |
try {
Object result = api.gcMarkAllMessagesAsRead(channelUrl)
.apiToken(apiToken)
.gcMarkAllMessagesAsReadData(gcMarkAllMessagesAsReadData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#gcMarkAllMessagesAsRead");
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] | |
gcMarkAllMessagesAsReadData | GcMarkAllMessagesAsReadData | [optional] |
Object
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
GcViewNumberOfEachMembersUnreadMessagesResponse gcViewNumberOfEachMembersUnreadMessages(channelUrl).apiToken(apiToken).userIds(userIds).execute();
View number of each member's unread messages
Retrieves the total number of each member's unread messages in a group channel. This action is only applicable for users in a group channel.
https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-number-of-each-member-s-unread-messages
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
List<String> userIds = Arrays.asList(); // List<String> |
try {
GcViewNumberOfEachMembersUnreadMessagesResponse result = api.gcViewNumberOfEachMembersUnreadMessages(channelUrl)
.apiToken(apiToken)
.userIds(userIds)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#gcViewNumberOfEachMembersUnreadMessages");
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] | |
userIds | List<String> | [optional] |
GcViewNumberOfEachMembersUnreadMessagesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdEmoji getEmojiByKey(emojiKey).apiToken(apiToken).execute();
Get an emoji
Retrieves an emoji with the specified key.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiKey = "emojiKey_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
SendBirdEmoji result = api.getEmojiByKey(emojiKey)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#getEmojiByKey");
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 |
---|---|---|---|
emojiKey | String | ||
apiToken | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdEmojiCategory getEmojiCategoryById(emojiCategoryId).apiToken(apiToken).execute();
Get an emoji category
Retrieves an emoji category with the specified ID, including its emojis.
emoji_category_id
Type: int
Description: Specifies the unique ID of the emoji category to retrieve.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiCategoryId = "emojiCategoryId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
SendBirdEmojiCategory result = api.getEmojiCategoryById(emojiCategoryId)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#getEmojiCategoryById");
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 |
---|---|---|---|
emojiCategoryId | String | ||
apiToken | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ListAllEmojisAndEmojiCategoriesResponse listAllEmojisAndEmojiCategories().apiToken(apiToken).execute();
List all emojis and emoji categories
Retrieves a list of all emoji categories registered to the application, including their emojis.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-list-all-emojis-and-emoji-categories
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
try {
ListAllEmojisAndEmojiCategoriesResponse result = api.listAllEmojisAndEmojiCategories()
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#listAllEmojisAndEmojiCategories");
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] |
ListAllEmojisAndEmojiCategoriesResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ListAnnouncementsResponse listAnnouncements().apiToken(apiToken).token(token).limit(limit).order(order).status(status).announcementGroup(announcementGroup).execute();
List announcements
Retrieves a list of announcements.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
String token = "token_example"; // String |
Integer limit = 56; // Integer |
String order = "order_example"; // String |
String status = "status_example"; // String |
String announcementGroup = "announcementGroup_example"; // String |
try {
ListAnnouncementsResponse result = api.listAnnouncements()
.apiToken(apiToken)
.token(token)
.limit(limit)
.order(order)
.status(status)
.announcementGroup(announcementGroup)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#listAnnouncements");
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] | |
order | String | [optional] | |
status | String | [optional] | |
announcementGroup | String | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ListEmojisResponse listEmojis().apiToken(apiToken).execute();
List emojis
Retrieves a list of all emojis registered to the application.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-list-emojis
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
try {
ListEmojisResponse result = api.listEmojis()
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#listEmojis");
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] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ListMessagesResponse listMessages(channelType, channelUrl).apiToken(apiToken).messageTs(messageTs).messageId(messageId).prevLimit(prevLimit).nextLimit(nextLimit).include(include).reverse(reverse).senderId(senderId).senderIds(senderIds).operatorFilter(operatorFilter).customTypes(customTypes).messageType(messageType).includingRemoved(includingRemoved).includeReactions(includeReactions).includeReplyType(includeReplyType).includeParentMessageInfo(includeParentMessageInfo).withSortedMetaArray(withSortedMetaArray).showSubchannelMessagesOnly(showSubchannelMessagesOnly).userId(userId).customType(customType).withMetaArray(withMetaArray).execute();
List messages
Retrieves a list of past messages of a channel.
This message retrieval is one of Sendbird's premium features. Contact our sales team for further assistance.
channel_type
Type: string
Description: Specifies the type of the channel. Either open_channels or group_channels.
channel_url
Type: string
Description: Specifies the URL of the channel to retrieve a list of past messages.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
String messageTs = "messageTs_example"; // String |
Integer messageId = 56; // Integer |
Integer prevLimit = 56; // Integer |
Integer nextLimit = 56; // Integer |
Boolean include = true; // Boolean |
Boolean reverse = true; // Boolean |
String senderId = "senderId_example"; // String |
String senderIds = "senderIds_example"; // String |
String operatorFilter = "operatorFilter_example"; // String |
String customTypes = "customTypes_example"; // String |
String messageType = "messageType_example"; // String |
Boolean includingRemoved = true; // Boolean |
Boolean includeReactions = true; // Boolean |
String includeReplyType = "NONE"; // String | One of following values: NONE, ALL, ONLY_REPLY_TO_CHANNEL
Boolean includeParentMessageInfo = true; // Boolean |
Boolean withSortedMetaArray = true; // Boolean |
Boolean showSubchannelMessagesOnly = true; // Boolean |
String userId = "userId_example"; // String |
String customType = "customType_example"; // String |
Boolean withMetaArray = true; // Boolean |
try {
ListMessagesResponse result = api.listMessages(channelType, channelUrl)
.apiToken(apiToken)
.messageTs(messageTs)
.messageId(messageId)
.prevLimit(prevLimit)
.nextLimit(nextLimit)
.include(include)
.reverse(reverse)
.senderId(senderId)
.senderIds(senderIds)
.operatorFilter(operatorFilter)
.customTypes(customTypes)
.messageType(messageType)
.includingRemoved(includingRemoved)
.includeReactions(includeReactions)
.includeReplyType(includeReplyType)
.includeParentMessageInfo(includeParentMessageInfo)
.withSortedMetaArray(withSortedMetaArray)
.showSubchannelMessagesOnly(showSubchannelMessagesOnly)
.userId(userId)
.customType(customType)
.withMetaArray(withMetaArray)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#listMessages");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
apiToken | String | [optional] | |
messageTs | String | [optional] | |
messageId | Integer | [optional] | |
prevLimit | Integer | [optional] | |
nextLimit | Integer | [optional] | |
include | Boolean | [optional] | |
reverse | Boolean | [optional] | |
senderId | String | [optional] | |
senderIds | String | [optional] | |
operatorFilter | String | [optional] | |
customTypes | String | [optional] | |
messageType | String | [optional] | |
includingRemoved | Boolean | [optional] | |
includeReactions | Boolean | [optional] | |
includeReplyType | String | One of following values: NONE, ALL, ONLY_REPLY_TO_CHANNEL | [optional] [enum: NONE, ALL, ONLY_REPLY_TO_CHANNEL] |
includeParentMessageInfo | Boolean | [optional] | |
withSortedMetaArray | Boolean | [optional] | |
showSubchannelMessagesOnly | Boolean | [optional] | |
userId | String | [optional] | |
customType | String | [optional] | |
withMetaArray | Boolean | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ListReactionsOfMessageResponse listReactionsOfMessage(channelType, channelUrl, messageId).apiToken(apiToken).listUsers(listUsers).execute();
List reactions of a message
Retrieves a list of reactions made to a message.
Note: Currently, this action is only available in group channels.
channel_type
Type: string
Description: Specifies the type of the channel. Either open_channels or group_channels.
channel_url
Type: string
Description: Specifies the URL of the target channel.
message_id
Type: long
Description: Specifies the unique ID of the message to add a reaction to.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
Boolean listUsers = true; // Boolean |
try {
ListReactionsOfMessageResponse result = api.listReactionsOfMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.listUsers(listUsers)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#listReactionsOfMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
listUsers | Boolean | [optional] |
ListReactionsOfMessageResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
migrateMessagesByUrl(targetChannelUrl).apiToken(apiToken).body(body).execute();
Migrate messages
Using our migration API, you can migrate the messages from another system into a Sendbird system's channel which consists of users, messages, and other chat-related data.
To turn on this feature, contact our support team.
There are three things to do in advance before the migration. Follow the instructions below:
- Register the users of your current chat solution to your Sendbird application. You can migrate the users into the Sendbird system using the user creation API.
- Create either an open or a group channel to migrate the messages of your chat solution. The Sendbird system doesn't create a channel for your migration automatically.
- The maximum number of migrated messages per call is 100. To avoid the failure during your migration, you must adjust the number of messages to process at once via the API.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String targetChannelUrl = "targetChannelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
Object body = null; // Object |
try {
api.migrateMessagesByUrl(targetChannelUrl)
.apiToken(apiToken)
.body(body)
.execute();
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#migrateMessagesByUrl");
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 |
---|---|---|---|
targetChannelUrl | String | ||
apiToken | String | [optional] | |
body | Object | [optional] |
null (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
Object removeExtraDataFromMessage(channelType, channelUrl, messageId).apiToken(apiToken).keys(keys).execute();
Remove extra data from a message
Removes specific items from a message by their keys.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
List<String> keys = Arrays.asList(); // List<String> |
try {
Object result = api.removeExtraDataFromMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.keys(keys)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#removeExtraDataFromMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
keys | List<String> | [optional] |
Object
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
RemoveReactionFromAMessageResponse removeReactionFromAMessage(channelType, channelUrl, messageId).apiToken(apiToken).userId(userId).reaction(reaction).execute();
Remove a reaction from a message
Removes a specific reaction from a message.
Note: Currently, this action is only available in group channels.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
String userId = "userId_example"; // String |
String reaction = "reaction_example"; // String |
try {
RemoveReactionFromAMessageResponse result = api.removeReactionFromAMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.userId(userId)
.reaction(reaction)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#removeReactionFromAMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
userId | String | [optional] | |
reaction | String | [optional] |
RemoveReactionFromAMessageResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdMessageResponse sendMessage(channelType, channelUrl).apiToken(apiToken).sendMessageData(sendMessageData).execute();
Send a message
Sends a message to a channel. You can send a text message, a file message, and an admin message.
Note: With Sendbird Chat SDKs and the platform API, any type of files in messages can be uploaded to Sendbird server.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
SendMessageData sendMessageData = new SendMessageData(); // SendMessageData |
try {
SendBirdMessageResponse result = api.sendMessage(channelType, channelUrl)
.apiToken(apiToken)
.sendMessageData(sendMessageData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#sendMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
apiToken | String | [optional] | |
sendMessageData | SendMessageData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdMessageResponse translateMessageIntoOtherLanguages(channelType, channelUrl, messageId).apiToken(apiToken).translateMessageIntoOtherLanguagesData(translateMessageIntoOtherLanguagesData).execute();
Translate a message into other languages
Translates a message into specific languages. Only text messages of which type is MESG can be translated into other languages.
Note: Message translation is powered by Google Cloud Translation API recognition engine. Find language codes supported by the engine in the Miscellaneous page or visit the Language Support for Google Cloud Translation.
https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-translate-a-message-into-other-languages
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
TranslateMessageIntoOtherLanguagesData translateMessageIntoOtherLanguagesData = new TranslateMessageIntoOtherLanguagesData(); // TranslateMessageIntoOtherLanguagesData |
try {
SendBirdMessageResponse result = api.translateMessageIntoOtherLanguages(channelType, channelUrl, messageId)
.apiToken(apiToken)
.translateMessageIntoOtherLanguagesData(translateMessageIntoOtherLanguagesData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#translateMessageIntoOtherLanguages");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
translateMessageIntoOtherLanguagesData | TranslateMessageIntoOtherLanguagesData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdEmojiCategory updateEmojiCategoryUrlById(emojiCategoryId).apiToken(apiToken).updateEmojiCategoryUrlByIdData(updateEmojiCategoryUrlByIdData).execute();
Update an emoji category URL
Updates the URL of an emoji category with the specified ID.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiCategoryId = "emojiCategoryId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
UpdateEmojiCategoryUrlByIdData updateEmojiCategoryUrlByIdData = new UpdateEmojiCategoryUrlByIdData(); // UpdateEmojiCategoryUrlByIdData |
try {
SendBirdEmojiCategory result = api.updateEmojiCategoryUrlById(emojiCategoryId)
.apiToken(apiToken)
.updateEmojiCategoryUrlByIdData(updateEmojiCategoryUrlByIdData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#updateEmojiCategoryUrlById");
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 |
---|---|---|---|
emojiCategoryId | String | ||
apiToken | String | [optional] | |
updateEmojiCategoryUrlByIdData | UpdateEmojiCategoryUrlByIdData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdEmoji updateEmojiUrlByKey(emojiKey).apiToken(apiToken).updateEmojiUrlByKeyData(updateEmojiUrlByKeyData).execute();
Update an emoji URL
Updates the image URL of an emoji with the specified key.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String emojiKey = "emojiKey_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
UpdateEmojiUrlByKeyData updateEmojiUrlByKeyData = new UpdateEmojiUrlByKeyData(); // UpdateEmojiUrlByKeyData |
try {
SendBirdEmoji result = api.updateEmojiUrlByKey(emojiKey)
.apiToken(apiToken)
.updateEmojiUrlByKeyData(updateEmojiUrlByKeyData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#updateEmojiUrlByKey");
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 |
---|---|---|---|
emojiKey | String | ||
apiToken | String | [optional] | |
updateEmojiUrlByKeyData | UpdateEmojiUrlByKeyData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
UpdateExtraDataInMessageResponse updateExtraDataInMessage(channelType, channelUrl, messageId).apiToken(apiToken).updateExtraDataInMessageData(updateExtraDataInMessageData).execute();
Update extra data in a message
Updates the values of specific items by their keys.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
UpdateExtraDataInMessageData updateExtraDataInMessageData = new UpdateExtraDataInMessageData(); // UpdateExtraDataInMessageData |
try {
UpdateExtraDataInMessageResponse result = api.updateExtraDataInMessage(channelType, channelUrl, messageId)
.apiToken(apiToken)
.updateExtraDataInMessageData(updateExtraDataInMessageData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#updateExtraDataInMessage");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
updateExtraDataInMessageData | UpdateExtraDataInMessageData | [optional] |
UpdateExtraDataInMessageResponse
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdMessageResponse updateMessageById(channelType, channelUrl, messageId).apiToken(apiToken).updateMessageByIdData(updateMessageByIdData).execute();
Update a message
Updates information on a message in 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
UpdateMessageByIdData updateMessageByIdData = new UpdateMessageByIdData(); // UpdateMessageByIdData |
try {
SendBirdMessageResponse result = api.updateMessageById(channelType, channelUrl, messageId)
.apiToken(apiToken)
.updateMessageByIdData(updateMessageByIdData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#updateMessageById");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
updateMessageByIdData | UpdateMessageByIdData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
UseDefaultEmojisResponse useDefaultEmojis().apiToken(apiToken).useDefaultEmojisData(useDefaultEmojisData).execute();
Use default emojis
Determines whether to use the 7 default emojis initially provided.
https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-use-default-emojis
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String apiToken = "{{API_TOKEN}}"; // String |
UseDefaultEmojisData useDefaultEmojisData = new UseDefaultEmojisData(); // UseDefaultEmojisData |
try {
UseDefaultEmojisResponse result = api.useDefaultEmojis()
.apiToken(apiToken)
.useDefaultEmojisData(useDefaultEmojisData)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#useDefaultEmojis");
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] | |
useDefaultEmojisData | UseDefaultEmojisData | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
SendBirdMessageResponse viewMessageById(channelType, channelUrl, messageId).apiToken(apiToken).withSortedMetaArray(withSortedMetaArray).withMetaArray(withMetaArray).includeParentMessageInfo(includeParentMessageInfo).execute();
View a message
Retrieves information on a message.
channel_type
Type: string
Description: Specifies the type of the channel. Either open_channels or group_channels.
channel_url
Type: string
Description: Specifies the URL of the target channel.
message_id
Type: long
Description: Specifies the unique ID of the message to retrieve.
// 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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String messageId = "messageId_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
Boolean withSortedMetaArray = true; // Boolean |
Boolean withMetaArray = true; // Boolean |
Boolean includeParentMessageInfo = true; // Boolean |
try {
SendBirdMessageResponse result = api.viewMessageById(channelType, channelUrl, messageId)
.apiToken(apiToken)
.withSortedMetaArray(withSortedMetaArray)
.withMetaArray(withMetaArray)
.includeParentMessageInfo(includeParentMessageInfo)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#viewMessageById");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
messageId | String | ||
apiToken | String | [optional] | |
withSortedMetaArray | Boolean | [optional] | |
withMetaArray | Boolean | [optional] | |
includeParentMessageInfo | Boolean | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
ViewTotalNumberOfMessagesInChannelResponse viewTotalNumberOfMessagesInChannel(channelType, channelUrl).apiToken(apiToken).execute();
View total number of messages in a channel
Retrieves the total number of messages in a channel.
https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-total-number-of-messages-in-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.MessageApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api-APP_ID.sendbird.com");
MessageApi apiInstance = new MessageApi(defaultClient);
String channelType = "channelType_example"; // String |
String channelUrl = "channelUrl_example"; // String |
String apiToken = "{{API_TOKEN}}"; // String |
try {
ViewTotalNumberOfMessagesInChannelResponse result = api.viewTotalNumberOfMessagesInChannel(channelType, channelUrl)
.apiToken(apiToken)
.execute();
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling MessageApi#viewTotalNumberOfMessagesInChannel");
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 |
---|---|---|---|
channelType | String | ||
channelUrl | String | ||
apiToken | String | [optional] |
ViewTotalNumberOfMessagesInChannelResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |