All URIs are relative to https://api-APP_ID.sendbird.com
Method | HTTP request | Description |
---|---|---|
add_emoji_categories | POST /v3/emoji_categories | Add emoji categories |
add_emojis | POST /v3/emojis | Add emojis |
add_extra_data_to_message | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Add extra data to a message |
add_reaction_to_a_message | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Add a reaction to a message |
delete_emoji_by_key | DELETE /v3/emojis/{emoji_key} | Delete an emoji |
delete_emoji_category_by_id | DELETE /v3/emoji_categories/{emoji_category_id} | Delete an emoji category |
delete_message_by_id | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id} | Delete a message |
enable_reactions | PUT /v3/applications/settings/reactions | Enable reactions |
gc_mark_all_messages_as_delivered | PUT /v3/group_channels/{channel_url}/messages/mark_as_delivered | Mark all messages as delivered |
gc_mark_all_messages_as_read | PUT /v3/group_channels/{channel_url}/messages/mark_as_read | Mark all messages as read |
gc_view_number_of_each_members_unread_messages | GET /v3/group_channels/{channel_url}/messages/unread_count | View number of each member's unread messages |
get_emoji_by_key | GET /v3/emojis/{emoji_key} | Get an emoji |
get_emoji_category_by_id | GET /v3/emoji_categories/{emoji_category_id} | Get an emoji category |
list_all_emojis_and_emoji_categories | GET /v3/emoji_categories | List all emojis and emoji categories |
list_announcements | GET /v3/announcements | List announcements |
list_emojis | GET /v3/emojis | List emojis |
list_messages | GET /v3/{channel_type}/{channel_url}/messages | List messages |
list_reactions_of_message | GET /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | List reactions of a message |
migrate_messages_by_url | POST /v3/migration/{target_channel_url} | Migrate messages |
remove_extra_data_from_message | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Remove extra data from a message |
remove_reaction_from_a_message | DELETE /v3/{channel_type}/{channel_url}/messages/{message_id}/reactions | Remove a reaction from a message |
send_message | POST /v3/{channel_type}/{channel_url}/messages | Send a message |
translate_message_into_other_languages | POST /v3/{channel_type}/{channel_url}/messages/{message_id}/translation | Translate a message into other languages |
update_emoji_category_url_by_id | PUT /v3/emoji_categories/{emoji_category_id} | Update an emoji category URL |
update_emoji_url_by_key | PUT /v3/emojis/{emoji_key} | Update an emoji URL |
update_extra_data_in_message | PUT /v3/{channel_type}/{channel_url}/messages/{message_id}/sorted_metaarray | Update extra data in a message |
update_message_by_id | PUT /v3/{channel_type}/{channel_url}/messages/{message_id} | Update a message |
use_default_emojis | PUT /v3/applications/settings/use_default_emoji | Use default emojis |
view_message_by_id | GET /v3/{channel_type}/{channel_url}/messages/{message_id} | View a message |
view_total_number_of_messages_in_channel | GET /v3/{channel_type}/{channel_url}/messages/total_count | View total number of messages in a channel |
AddEmojiCategoriesResponse add_emoji_categories()
Add emoji categories
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.add_emoji_categories_response import AddEmojiCategoriesResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
body = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Add emoji categories
api_response = api_instance.add_emoji_categories(api_token=api_token, body=body)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_emoji_categories: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] | |
body | {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | [optional] |
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]
AddEmojisResponse add_emojis()
Add emojis
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.add_emojis_response import AddEmojisResponse
from sendbird_platform_sdk.model.add_emojis_data import AddEmojisData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
add_emojis_data = AddEmojisData(
emoji_category_id=1,
emojis=[
{},
],
) # AddEmojisData | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Add emojis
api_response = api_instance.add_emojis(api_token=api_token, add_emojis_data=add_emojis_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_emojis: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] | |
add_emojis_data | AddEmojisData | [optional] |
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]
AddExtraDataToMessageResponse add_extra_data_to_message(channel_type, channel_url, message_id)
Add extra data to a message
Add extra data to a message Adds one or more key-values items which store additional information for a message. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-add-extra-data-to-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.add_extra_data_to_message_response import AddExtraDataToMessageResponse
from sendbird_platform_sdk.model.add_extra_data_to_message_data import AddExtraDataToMessageData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
add_extra_data_to_message_data = AddExtraDataToMessageData(
channel_type="channel_type_example",
channel_url="channel_url_example",
message_id=1,
sorted_metaarray="sorted_metaarray_example",
) # AddExtraDataToMessageData | (optional)
# example passing only required values which don't have defaults set
try:
# Add extra data to a message
api_response = api_instance.add_extra_data_to_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_extra_data_to_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Add extra data to a message
api_response = api_instance.add_extra_data_to_message(channel_type, channel_url, message_id, api_token=api_token, add_extra_data_to_message_data=add_extra_data_to_message_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_extra_data_to_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
add_extra_data_to_message_data | AddExtraDataToMessageData | [optional] |
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]
AddReactionToAMessageResponse add_reaction_to_a_message(channel_type, channel_url, message_id)
Add a reaction to a message
Add a reaction to a message Adds a specific reaction to a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-add-a-reaction-to-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.add_reaction_to_a_message_data import AddReactionToAMessageData
from sendbird_platform_sdk.model.add_reaction_to_a_message_response import AddReactionToAMessageResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
add_reaction_to_a_message_data = AddReactionToAMessageData(
channel_type="channel_type_example",
channel_url="channel_url_example",
message_id=1,
user_id="user_id_example",
reaction="reaction_example",
) # AddReactionToAMessageData | (optional)
# example passing only required values which don't have defaults set
try:
# Add a reaction to a message
api_response = api_instance.add_reaction_to_a_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_reaction_to_a_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Add a reaction to a message
api_response = api_instance.add_reaction_to_a_message(channel_type, channel_url, message_id, api_token=api_token, add_reaction_to_a_message_data=add_reaction_to_a_message_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->add_reaction_to_a_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
add_reaction_to_a_message_data | AddReactionToAMessageData | [optional] |
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]
delete_emoji_by_key(emoji_key)
Delete an emoji
Delete an emoji Deletes an emoji from the application. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-delete-an-emoji ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_key = "emoji_key_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Delete an emoji
api_instance.delete_emoji_by_key(emoji_key)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_emoji_by_key: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Delete an emoji
api_instance.delete_emoji_by_key(emoji_key, api_token=api_token)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_emoji_by_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_key | str | ||
api_token | str | [optional] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_emoji_category_by_id(emoji_category_id)
Delete an emoji category
Delete an emoji category Deletes an emoji category with the specified ID. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-delete-an-emoji-category ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_category_id = "emoji_category_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Delete an emoji category
api_response = api_instance.delete_emoji_category_by_id(emoji_category_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_emoji_category_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Delete an emoji category
api_response = api_instance.delete_emoji_category_by_id(emoji_category_id, api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_emoji_category_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_category_id | str | ||
api_token | str | [optional] |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
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]
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} delete_message_by_id(channel_type, channel_url, message_id)
Delete a message
Delete a message Deletes a message from a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-delete-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Delete a message
api_response = api_instance.delete_message_by_id(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_message_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Delete a message
api_response = api_instance.delete_message_by_id(channel_type, channel_url, message_id, api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->delete_message_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
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]
EnableReactionsResponse enable_reactions()
Enable reactions
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.enable_reactions_response import EnableReactionsResponse
from sendbird_platform_sdk.model.enable_reactions_data import EnableReactionsData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
enable_reactions_data = EnableReactionsData(
enabled=True,
) # EnableReactionsData | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Enable reactions
api_response = api_instance.enable_reactions(api_token=api_token, enable_reactions_data=enable_reactions_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->enable_reactions: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] | |
enable_reactions_data | EnableReactionsData | [optional] |
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]
GcMarkAllMessagesAsDeliveredResponse gc_mark_all_messages_as_delivered(channel_url)
Mark all messages as delivered
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. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-mark-all-messages-as-delivered ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.gc_mark_all_messages_as_delivered_data import GcMarkAllMessagesAsDeliveredData
from sendbird_platform_sdk.model.gc_mark_all_messages_as_delivered_response import GcMarkAllMessagesAsDeliveredResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
gc_mark_all_messages_as_delivered_data = GcMarkAllMessagesAsDeliveredData(
application_id="application_id_example",
channel_url="channel_url_example",
user_id="user_id_example",
) # GcMarkAllMessagesAsDeliveredData | (optional)
# example passing only required values which don't have defaults set
try:
# Mark all messages as delivered
api_response = api_instance.gc_mark_all_messages_as_delivered(channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_mark_all_messages_as_delivered: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Mark all messages as delivered
api_response = api_instance.gc_mark_all_messages_as_delivered(channel_url, api_token=api_token, gc_mark_all_messages_as_delivered_data=gc_mark_all_messages_as_delivered_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_mark_all_messages_as_delivered: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_url | str | ||
api_token | str | [optional] | |
gc_mark_all_messages_as_delivered_data | GcMarkAllMessagesAsDeliveredData | [optional] |
GcMarkAllMessagesAsDeliveredResponse
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]
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} gc_mark_all_messages_as_read(channel_url)
Mark all messages as read
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. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-mark-all-messages-as-read ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.gc_mark_all_messages_as_read_data import GcMarkAllMessagesAsReadData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
gc_mark_all_messages_as_read_data = GcMarkAllMessagesAsReadData(
channel_url="channel_url_example",
user_id="user_id_example",
timestamp=1,
) # GcMarkAllMessagesAsReadData | (optional)
# example passing only required values which don't have defaults set
try:
# Mark all messages as read
api_response = api_instance.gc_mark_all_messages_as_read(channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_mark_all_messages_as_read: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Mark all messages as read
api_response = api_instance.gc_mark_all_messages_as_read(channel_url, api_token=api_token, gc_mark_all_messages_as_read_data=gc_mark_all_messages_as_read_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_mark_all_messages_as_read: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_url | str | ||
api_token | str | [optional] | |
gc_mark_all_messages_as_read_data | GcMarkAllMessagesAsReadData | [optional] |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
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]
GcViewNumberOfEachMembersUnreadMessagesResponse gc_view_number_of_each_members_unread_messages(channel_url)
View number of each member's unread messages
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.gc_view_number_of_each_members_unread_messages_response import GcViewNumberOfEachMembersUnreadMessagesResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
user_ids = [
"user_ids_example",
] # [str] | (optional)
# example passing only required values which don't have defaults set
try:
# View number of each member's unread messages
api_response = api_instance.gc_view_number_of_each_members_unread_messages(channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_view_number_of_each_members_unread_messages: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# View number of each member's unread messages
api_response = api_instance.gc_view_number_of_each_members_unread_messages(channel_url, api_token=api_token, user_ids=user_ids)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->gc_view_number_of_each_members_unread_messages: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_url | str | ||
api_token | str | [optional] | |
user_ids | [str] | [optional] |
GcViewNumberOfEachMembersUnreadMessagesResponse
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]
SendBirdEmoji get_emoji_by_key(emoji_key)
Get an emoji
Get an emoji Retrieves an emoji with the specified key. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-get-an-emoji ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_emoji import SendBirdEmoji
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_key = "emoji_key_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Get an emoji
api_response = api_instance.get_emoji_by_key(emoji_key)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->get_emoji_by_key: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Get an emoji
api_response = api_instance.get_emoji_by_key(emoji_key, api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->get_emoji_by_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_key | str | ||
api_token | str | [optional] |
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]
SendBirdEmojiCategory get_emoji_category_by_id(emoji_category_id)
Get an emoji category
Get an emoji category Retrieves an emoji category with the specified ID, including its emojis. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-get-an-emoji-category ---------------------------- emoji_category_id
Type: int Description: Specifies the unique ID of the emoji category to retrieve.
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_emoji_category import SendBirdEmojiCategory
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_category_id = "emoji_category_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Get an emoji category
api_response = api_instance.get_emoji_category_by_id(emoji_category_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->get_emoji_category_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Get an emoji category
api_response = api_instance.get_emoji_category_by_id(emoji_category_id, api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->get_emoji_category_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_category_id | str | ||
api_token | str | [optional] |
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]
ListAllEmojisAndEmojiCategoriesResponse list_all_emojis_and_emoji_categories()
List all emojis and emoji categories
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.list_all_emojis_and_emoji_categories_response import ListAllEmojisAndEmojiCategoriesResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# List all emojis and emoji categories
api_response = api_instance.list_all_emojis_and_emoji_categories(api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_all_emojis_and_emoji_categories: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] |
ListAllEmojisAndEmojiCategoriesResponse
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]
ListAnnouncementsResponse list_announcements()
List announcements
List announcements Retrieves a list of announcements. https://sendbird.com/docs/chat/v3/platform-api/guides/announcements#2-list-announcements ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.list_announcements_response import ListAnnouncementsResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
token = "token_example" # str | (optional)
limit = 1 # int | (optional)
order = "order_example" # str | (optional)
status = "status_example" # str | (optional)
announcement_group = "announcement_group_example" # str | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# List announcements
api_response = api_instance.list_announcements(api_token=api_token, token=token, limit=limit, order=order, status=status, announcement_group=announcement_group)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_announcements: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] | |
token | str | [optional] | |
limit | int | [optional] | |
order | str | [optional] | |
status | str | [optional] | |
announcement_group | str | [optional] |
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]
ListEmojisResponse list_emojis()
List emojis
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.list_emojis_response import ListEmojisResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# List emojis
api_response = api_instance.list_emojis(api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_emojis: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] |
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]
ListMessagesResponse list_messages(channel_type, channel_url)
List messages
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. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-list-messages ---------------------------- 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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.list_messages_response import ListMessagesResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
message_ts = "message_ts_example" # str | (optional)
message_id = 1 # int | (optional)
prev_limit = 1 # int | (optional)
next_limit = 1 # int | (optional)
include = True # bool | (optional)
reverse = True # bool | (optional)
sender_id = "sender_id_example" # str | (optional)
sender_ids = "sender_ids_example" # str | (optional)
operator_filter = "operator_filter_example" # str | (optional)
custom_types = "custom_types_example" # str | (optional)
message_type = "message_type_example" # str | (optional)
including_removed = True # bool | (optional)
include_reactions = True # bool | (optional)
include_reply_type = "NONE" # str | One of following values: NONE, ALL, ONLY_REPLY_TO_CHANNEL (optional)
include_parent_message_info = True # bool | (optional)
with_sorted_meta_array = True # bool | (optional)
show_subchannel_messages_only = True # bool | (optional)
user_id = "user_id_example" # str | (optional)
custom_type = "custom_type_example" # str | (optional)
with_meta_array = True # bool | (optional)
# example passing only required values which don't have defaults set
try:
# List messages
api_response = api_instance.list_messages(channel_type, channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_messages: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# List messages
api_response = api_instance.list_messages(channel_type, channel_url, api_token=api_token, message_ts=message_ts, message_id=message_id, prev_limit=prev_limit, next_limit=next_limit, include=include, reverse=reverse, sender_id=sender_id, sender_ids=sender_ids, operator_filter=operator_filter, custom_types=custom_types, message_type=message_type, including_removed=including_removed, include_reactions=include_reactions, include_reply_type=include_reply_type, include_parent_message_info=include_parent_message_info, with_sorted_meta_array=with_sorted_meta_array, show_subchannel_messages_only=show_subchannel_messages_only, user_id=user_id, custom_type=custom_type, with_meta_array=with_meta_array)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_messages: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
api_token | str | [optional] | |
message_ts | str | [optional] | |
message_id | int | [optional] | |
prev_limit | int | [optional] | |
next_limit | int | [optional] | |
include | bool | [optional] | |
reverse | bool | [optional] | |
sender_id | str | [optional] | |
sender_ids | str | [optional] | |
operator_filter | str | [optional] | |
custom_types | str | [optional] | |
message_type | str | [optional] | |
including_removed | bool | [optional] | |
include_reactions | bool | [optional] | |
include_reply_type | str | One of following values: NONE, ALL, ONLY_REPLY_TO_CHANNEL | [optional] |
include_parent_message_info | bool | [optional] | |
with_sorted_meta_array | bool | [optional] | |
show_subchannel_messages_only | bool | [optional] | |
user_id | str | [optional] | |
custom_type | str | [optional] | |
with_meta_array | bool | [optional] |
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]
ListReactionsOfMessageResponse list_reactions_of_message(channel_type, channel_url, message_id)
List reactions of a message
List reactions of a message Retrieves a list of reactions made to a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-list-reactions-of-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 add a reaction to.
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.list_reactions_of_message_response import ListReactionsOfMessageResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
list_users = True # bool | (optional)
# example passing only required values which don't have defaults set
try:
# List reactions of a message
api_response = api_instance.list_reactions_of_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_reactions_of_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# List reactions of a message
api_response = api_instance.list_reactions_of_message(channel_type, channel_url, message_id, api_token=api_token, list_users=list_users)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->list_reactions_of_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
list_users | bool | [optional] |
ListReactionsOfMessageResponse
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]
migrate_messages_by_url(target_channel_url)
Migrate messages
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: 1. 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. 2. 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. 3. 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. https://sendbird.com/docs/chat/v3/platform-api/guides/migration#2-migrate-messages ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
target_channel_url = "target_channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
body = {} # {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | (optional)
# example passing only required values which don't have defaults set
try:
# Migrate messages
api_instance.migrate_messages_by_url(target_channel_url)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->migrate_messages_by_url: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Migrate messages
api_instance.migrate_messages_by_url(target_channel_url, api_token=api_token, body=body)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->migrate_messages_by_url: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
target_channel_url | str | ||
api_token | str | [optional] | |
body | {str: (bool, date, datetime, dict, float, int, list, str, none_type)} | [optional] |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
{str: (bool, date, datetime, dict, float, int, list, str, none_type)} remove_extra_data_from_message(channel_type, channel_url, message_id)
Remove extra data from a message
Remove extra data from a message Removes specific items from a message by their keys. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-remove-extra-data-from-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
keys = [
"keys_example",
] # [str] | (optional)
# example passing only required values which don't have defaults set
try:
# Remove extra data from a message
api_response = api_instance.remove_extra_data_from_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->remove_extra_data_from_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Remove extra data from a message
api_response = api_instance.remove_extra_data_from_message(channel_type, channel_url, message_id, api_token=api_token, keys=keys)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->remove_extra_data_from_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
keys | [str] | [optional] |
{str: (bool, date, datetime, dict, float, int, list, str, none_type)}
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]
RemoveReactionFromAMessageResponse remove_reaction_from_a_message(channel_type, channel_url, message_id)
Remove a reaction from a message
Remove a reaction from a message Removes a specific reaction from a message. > Note: Currently, this action is only available in group channels. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-remove-a-reaction-from-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.remove_reaction_from_a_message_response import RemoveReactionFromAMessageResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
user_id = "user_id_example" # str | (optional)
reaction = "reaction_example" # str | (optional)
# example passing only required values which don't have defaults set
try:
# Remove a reaction from a message
api_response = api_instance.remove_reaction_from_a_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->remove_reaction_from_a_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Remove a reaction from a message
api_response = api_instance.remove_reaction_from_a_message(channel_type, channel_url, message_id, api_token=api_token, user_id=user_id, reaction=reaction)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->remove_reaction_from_a_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
user_id | str | [optional] | |
reaction | str | [optional] |
RemoveReactionFromAMessageResponse
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]
SendBirdMessageResponse send_message(channel_type, channel_url)
Send a message
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. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-send-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_message_response import SendBirdMessageResponse
from sendbird_platform_sdk.model.send_message_data import SendMessageData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
send_message_data = SendMessageData(
user_id="user_id_example",
channel_type="channel_type_example",
channel_url="channel_url_example",
message_type="message_type_example",
message="message_example",
custom_type="custom_type_example",
data="data_example",
send_push=True,
mention_type="mention_type_example",
mentioned_user_ids=[
"mentioned_user_ids_example",
],
is_silent=True,
sorted_metaarray="sorted_metaarray_example",
created_at=1,
dedup_id="dedup_id_example",
apns_bundle_id="apns_bundle_id_example",
sound="sound_example",
volume=3.14,
url="url_example",
file="file_example",
file_name="file_name_example",
file_size=3.14,
file_type="file_type_example",
thumbnails=[
"thumbnails_example",
],
thumbnail1="thumbnail1_example",
thumbnail2="thumbnail2_example",
thumbnail3="thumbnail3_example",
) # SendMessageData | (optional)
# example passing only required values which don't have defaults set
try:
# Send a message
api_response = api_instance.send_message(channel_type, channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->send_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Send a message
api_response = api_instance.send_message(channel_type, channel_url, api_token=api_token, send_message_data=send_message_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->send_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
api_token | str | [optional] | |
send_message_data | SendMessageData | [optional] |
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]
SendBirdMessageResponse translate_message_into_other_languages(channel_type, channel_url, message_id)
Translate a message into other languages
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_message_response import SendBirdMessageResponse
from sendbird_platform_sdk.model.translate_message_into_other_languages_data import TranslateMessageIntoOtherLanguagesData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
translate_message_into_other_languages_data = TranslateMessageIntoOtherLanguagesData(
target_langs=[
"target_langs_example",
],
) # TranslateMessageIntoOtherLanguagesData | (optional)
# example passing only required values which don't have defaults set
try:
# Translate a message into other languages
api_response = api_instance.translate_message_into_other_languages(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->translate_message_into_other_languages: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Translate a message into other languages
api_response = api_instance.translate_message_into_other_languages(channel_type, channel_url, message_id, api_token=api_token, translate_message_into_other_languages_data=translate_message_into_other_languages_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->translate_message_into_other_languages: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
translate_message_into_other_languages_data | TranslateMessageIntoOtherLanguagesData | [optional] |
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]
SendBirdEmojiCategory update_emoji_category_url_by_id(emoji_category_id)
Update an emoji category URL
Update an emoji category URL Updates the URL of an emoji category with the specified ID. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-update-an-emoji-category-url ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.update_emoji_category_url_by_id_data import UpdateEmojiCategoryUrlByIdData
from sendbird_platform_sdk.model.send_bird_emoji_category import SendBirdEmojiCategory
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_category_id = "emoji_category_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
update_emoji_category_url_by_id_data = UpdateEmojiCategoryUrlByIdData(
emoji_category_id=1,
url="url_example",
) # UpdateEmojiCategoryUrlByIdData | (optional)
# example passing only required values which don't have defaults set
try:
# Update an emoji category URL
api_response = api_instance.update_emoji_category_url_by_id(emoji_category_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_emoji_category_url_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update an emoji category URL
api_response = api_instance.update_emoji_category_url_by_id(emoji_category_id, api_token=api_token, update_emoji_category_url_by_id_data=update_emoji_category_url_by_id_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_emoji_category_url_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_category_id | str | ||
api_token | str | [optional] | |
update_emoji_category_url_by_id_data | UpdateEmojiCategoryUrlByIdData | [optional] |
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]
SendBirdEmoji update_emoji_url_by_key(emoji_key)
Update an emoji URL
Update an emoji URL Updates the image URL of an emoji with the specified key. https://sendbird.com/docs/chat/v3/platform-api/guides/emojis#2-update-an-emoji-url ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_emoji import SendBirdEmoji
from sendbird_platform_sdk.model.update_emoji_url_by_key_data import UpdateEmojiUrlByKeyData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
emoji_key = "emoji_key_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
update_emoji_url_by_key_data = UpdateEmojiUrlByKeyData(
emoji_key="emoji_key_example",
url="url_example",
) # UpdateEmojiUrlByKeyData | (optional)
# example passing only required values which don't have defaults set
try:
# Update an emoji URL
api_response = api_instance.update_emoji_url_by_key(emoji_key)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_emoji_url_by_key: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update an emoji URL
api_response = api_instance.update_emoji_url_by_key(emoji_key, api_token=api_token, update_emoji_url_by_key_data=update_emoji_url_by_key_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_emoji_url_by_key: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
emoji_key | str | ||
api_token | str | [optional] | |
update_emoji_url_by_key_data | UpdateEmojiUrlByKeyData | [optional] |
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]
UpdateExtraDataInMessageResponse update_extra_data_in_message(channel_type, channel_url, message_id)
Update extra data in a message
Update extra data in a message Updates the values of specific items by their keys. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-update-extra-data-in-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.update_extra_data_in_message_response import UpdateExtraDataInMessageResponse
from sendbird_platform_sdk.model.update_extra_data_in_message_data import UpdateExtraDataInMessageData
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
update_extra_data_in_message_data = UpdateExtraDataInMessageData(
channel_type="channel_type_example",
channel_url="channel_url_example",
message_id=1,
sorted_metaarray="sorted_metaarray_example",
mode="mode_example",
upsert=True,
) # UpdateExtraDataInMessageData | (optional)
# example passing only required values which don't have defaults set
try:
# Update extra data in a message
api_response = api_instance.update_extra_data_in_message(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_extra_data_in_message: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update extra data in a message
api_response = api_instance.update_extra_data_in_message(channel_type, channel_url, message_id, api_token=api_token, update_extra_data_in_message_data=update_extra_data_in_message_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_extra_data_in_message: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
update_extra_data_in_message_data | UpdateExtraDataInMessageData | [optional] |
UpdateExtraDataInMessageResponse
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]
SendBirdMessageResponse update_message_by_id(channel_type, channel_url, message_id)
Update a message
Update a message Updates information on a message in a channel. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-update-a-message ----------------------------
import time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.update_message_by_id_data import UpdateMessageByIdData
from sendbird_platform_sdk.model.send_bird_message_response import SendBirdMessageResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
update_message_by_id_data = UpdateMessageByIdData(
channel_type="channel_type_example",
channel_url="channel_url_example",
message_id=1,
message_type="message_type_example",
message="message_example",
custom_type="custom_type_example",
data="data_example",
mention_type="mention_type_example",
mentioned_user_ids=[
"mentioned_user_ids_example",
],
) # UpdateMessageByIdData | (optional)
# example passing only required values which don't have defaults set
try:
# Update a message
api_response = api_instance.update_message_by_id(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_message_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# Update a message
api_response = api_instance.update_message_by_id(channel_type, channel_url, message_id, api_token=api_token, update_message_by_id_data=update_message_by_id_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->update_message_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
update_message_by_id_data | UpdateMessageByIdData | [optional] |
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]
UseDefaultEmojisResponse use_default_emojis()
Use default emojis
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.use_default_emojis_data import UseDefaultEmojisData
from sendbird_platform_sdk.model.use_default_emojis_response import UseDefaultEmojisResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
api_token = "{{API_TOKEN}}" # str | (optional)
use_default_emojis_data = UseDefaultEmojisData(
use_default_emoji=True,
) # UseDefaultEmojisData | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
# Use default emojis
api_response = api_instance.use_default_emojis(api_token=api_token, use_default_emojis_data=use_default_emojis_data)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->use_default_emojis: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_token | str | [optional] | |
use_default_emojis_data | UseDefaultEmojisData | [optional] |
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]
SendBirdMessageResponse view_message_by_id(channel_type, channel_url, message_id)
View a message
View a message Retrieves information on a message. https://sendbird.com/docs/chat/v3/platform-api/guides/messages#2-view-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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.send_bird_message_response import SendBirdMessageResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
message_id = "message_id_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
with_sorted_meta_array = True # bool | (optional)
with_meta_array = True # bool | (optional)
include_parent_message_info = True # bool | (optional)
# example passing only required values which don't have defaults set
try:
# View a message
api_response = api_instance.view_message_by_id(channel_type, channel_url, message_id)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->view_message_by_id: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# View a message
api_response = api_instance.view_message_by_id(channel_type, channel_url, message_id, api_token=api_token, with_sorted_meta_array=with_sorted_meta_array, with_meta_array=with_meta_array, include_parent_message_info=include_parent_message_info)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->view_message_by_id: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
message_id | str | ||
api_token | str | [optional] | |
with_sorted_meta_array | bool | [optional] | |
with_meta_array | bool | [optional] | |
include_parent_message_info | bool | [optional] |
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]
ViewTotalNumberOfMessagesInChannelResponse view_total_number_of_messages_in_channel(channel_type, channel_url)
View total number of messages in a channel
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 time
import sendbird_platform_sdk
from sendbird_platform_sdk.api import message_api
from sendbird_platform_sdk.model.view_total_number_of_messages_in_channel_response import ViewTotalNumberOfMessagesInChannelResponse
from pprint import pprint
# Defining the host is optional and defaults to https://api-APP_ID.sendbird.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sendbird_platform_sdk.Configuration(
host = "https://api-APP_ID.sendbird.com"
)
# Enter a context with an instance of the API client
with sendbird_platform_sdk.ApiClient() as api_client:
# Create an instance of the API class
api_instance = message_api.MessageApi(api_client)
channel_type = "channel_type_example" # str |
channel_url = "channel_url_example" # str |
api_token = "{{API_TOKEN}}" # str | (optional)
# example passing only required values which don't have defaults set
try:
# View total number of messages in a channel
api_response = api_instance.view_total_number_of_messages_in_channel(channel_type, channel_url)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->view_total_number_of_messages_in_channel: %s\n" % e)
# example passing only required values which don't have defaults set
# and optional values
try:
# View total number of messages in a channel
api_response = api_instance.view_total_number_of_messages_in_channel(channel_type, channel_url, api_token=api_token)
pprint(api_response)
except sendbird_platform_sdk.ApiException as e:
print("Exception when calling MessageApi->view_total_number_of_messages_in_channel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_type | str | ||
channel_url | str | ||
api_token | str | [optional] |
ViewTotalNumberOfMessagesInChannelResponse
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]