Sendbird

Learn how to use Sendbird with Composio

Overview

SLUG: SENDBIRD

Description

Template description for Sendbird

Authentication Details

api_key
stringRequired

Connecting to Sendbird

Create an auth config

Use the dashboard to create an auth config for the Sendbird toolkit. This allows you to connect multiple Sendbird accounts to Composio for agents to use.

1

Select App

Navigate to Sendbird.

2

Configure Auth Config Settings

Select among the supported auth schemes of and configure them here.

3

Create and Get auth config ID

Click “Create Sendbird Auth Config”. After creation, copy the displayed ID starting with ac_. This is your auth config ID. This is not a sensitive ID — you can save it in environment variables or a database. This ID will be used to create connections to the toolkit for a given user.

Connect Your Account

Using API Key

1from composio import Composio
2
3# Replace these with your actual values
4sendbird_auth_config_id = "ac_YOUR_SENDBIRD_CONFIG_ID" # Auth config ID created above
5user_id = "0000-0000-0000" # UUID from database/app
6
7composio = Composio()
8
9def authenticate_toolkit(user_id: str, auth_config_id: str):
10 # Replace this with a method to retrieve an API key from the user.
11 # Or supply your own.
12 user_api_key = input("[!] Enter API key")
13
14 connection_request = composio.connected_accounts.initiate(
15 user_id=user_id,
16 auth_config_id=auth_config_id,
17 config={"auth_scheme": "API_KEY", "val": {"generic_api_key": user_api_key}}
18 )
19
20 # API Key authentication is immediate - no redirect needed
21 print(f"Successfully connected Sendbird for user {user_id}")
22 print(f"Connection status: {connection_request.status}")
23
24 return connection_request.id
25
26
27connection_id = authenticate_toolkit(user_id, sendbird_auth_config_id)
28
29# You can verify the connection using:
30connected_account = composio.connected_accounts.get(connection_id)
31print(f"Connected account: {connected_account}")

Tools

Executing tools

To prototype you can execute some tools to see the responses and working on the Sendbird toolkit’s playground

Python
1from composio import Composio
2from openai import OpenAI
3import json
4
5openai = OpenAI()
6composio = Composio()
7
8# User ID must be a valid UUID format
9user_id = "0000-0000-0000" # Replace with actual user UUID from your database
10
11tools = composio.tools.get(user_id=user_id, toolkits=["SENDBIRD"])
12
13print("[!] Tools:")
14print(json.dumps(tools))
15
16def invoke_llm(task = "What can you do?"):
17 completion = openai.chat.completions.create(
18 model="gpt-4o",
19 messages=[
20 {
21 "role": "user",
22 "content": task, # Your task here!
23 },
24 ],
25 tools=tools,
26 )
27
28 # Handle Result from tool call
29 result = composio.provider.handle_tool_calls(user_id=user_id, response=completion)
30 print(f"[!] Completion: {completion}")
31 print(f"[!] Tool call result: {result}")
32
33invoke_llm()

Tool List

Tool Name: Ban User from Group Channel

Description

Tool to ban a user from a group channel. use when moderating group channels to restrict member access. execute after confirming channel url and user id.

Action Parameters

agent_id
string
channel_url
stringRequired
description
string
seconds
integer
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Group Channel

Description

Tool to create a new group channel. use when you need to start a conversation with specific users. execute after specifying users and optional settings.

Action Parameters

access_code
string
channel_url
string
cover_file
string
cover_url
string
custom_fields
object
custom_type
string
data
string
is_chat_notification
boolean
is_discoverable
boolean
is_distinct
boolean
is_ephemeral
boolean
is_public
boolean
is_super
boolean
message_survival_seconds
integer
name
string
operator_ids
array
strict
boolean
user_ids
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Create Sendbird User

Description

Tool to create a new user. use when you need to register a user account in sendbird.

Action Parameters

discovery_keys
array
has_ever_logged_in
boolean
is_active
booleanDefaults to True
issue_access_token
boolean
metadata
object
nickname
string
phone_number
string
preferred_languages
array
profile_file
string
profile_url
string
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Issue Session Token

Description

Tool to issue a session token for a user. use when you need to generate or refresh a user's session token.

Action Parameters

expires_at
integer
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Group Channels

Description

Tool to list group channels. use when you need to fetch paginated group channels with optional filters.

Action Parameters

channel_urls
array
created_after
integer
created_before
integer
custom_type_startswith
string
custom_types
array
distinct_mode
string
limit
integer
members_exactly_in
array
members_include_in
array
members_nickname
string
my_member_state
string
name
string
public_mode
string
show_delivery_receipt
boolean
show_empty
boolean
show_frozen
boolean
show_metadata
boolean
show_read_receipt
boolean
super_mode
string
token
string
url_contains
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Users

Description

Tool to retrieve a list of users. use after setting up sendbird api credentials to paginate or filter all users in your application.

Action Parameters

custom_type
string
has_ever_logged_in
boolean
is_active
boolean
limit
integer
metatag_key
string
metatag_values
array
nickname
string
nickname_contains
string
order
string
token
string
user_ids
array

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Revoke All Session Tokens

Description

Tool to revoke all session tokens for a user. use when you need to invalidate all active sessions for security.

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Send Message

Description

Tool to send a message to a group channel. use when you need to post a text, file, or admin message to an existing group channel.

Action Parameters

channel_url
stringRequired
custom_type
string
data
string
is_operator_message
boolean
is_silent
boolean
mention_type
string
mentioned_user_ids
array
message
string
message_type
stringRequired
metaarray
array
parent_message_id
integer
poll_id
integer
push_notification_delivery_option
string
translation_target_languages
array
user_id
string

Action Response

channel_url
stringRequired
created_at
integerRequired
custom_type
string
data
string
error
string
mention_type
string
mentioned_user_ids
array
message
string
message_id
integerRequired
operator_message
boolean
parent_message_id
integer
silent
booleanRequired
successful
booleanRequired
thread_info
object
translations
array
type
stringRequired
updated_at
integerRequired
user
objectRequired

Tool Name: Unmute User

Description

Tool to unmute a user in a group channel. use when you want to restore a muted user's ability to send messages after confirming they are muted.

Action Parameters

channel_url
stringRequired
muted_user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Add Members To Group Channel

Description

Tool to add members to a group channel. use when you need to invite one or more users into an existing group channel.

Action Parameters

channel_url
stringRequired
hide_existing_messages
boolean
seconds
integer
user_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Group Channel

Description

Tool to delete a specific group channel. use when you have the channel url and want to permanently remove the channel. execute after confirming the channel exists.

Action Parameters

channel_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Message

Description

Tool to delete a specific message in a sendbird group channel. use when you need to permanently remove a sent message after confirming deletion permissions.

Action Parameters

channel_url
stringRequired
message_id
integerRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Delete Sendbird User

Description

Tool to delete a sendbird user. use when you need to remove a user from your sendbird application, optionally permanently.

Action Parameters

hard_delete
boolean
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Get Count Preference Of Channel

Description

Tool to retrieve a user's count preference for a specific group channel. use after confirming the user and channel exist to determine whether to display all, unread-only, or mention-only counts.

Action Parameters

channel_url
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Sendbird Get Group Channel Count by Join Status

Description

Tool to retrieve number of group channels by join status for a user. use when you need counts of invited, joined, and total channels for a specific user.

Action Parameters

custom_types
array
distinct_mode
string
public_mode
string
super_mode
string
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Sendbird Get Unread Item Count

Description

Tool to retrieve a user's unread item counts. use after you need the total unread messages, mentions, and channel counts for a specific user.

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Leave Group Channels

Description

Tool to leave group channels for a user. use when you need to make a user exit one or more joined group channels.

Action Parameters

channel_urls
arrayRequired
should_leave_all
boolean
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Banned Members

Description

Tool to list banned members in a group channel. use when you need to see which users are banned from a specific group channel.

Action Parameters

channel_url
stringRequired
limit
integer
token
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Group Channel Members

Description

Tool to list members of a group channel. use when you need to paginate through members of a specified group channel.

Action Parameters

channel_url
stringRequired
limit
integer
member_state_filter
string
muted_member_filter
string
nickname_startswith
string
offset
integer
operator_filter
string
order
string
token
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Operators by Custom Channel Type

Description

Tool to list operators of a channel by custom channel type. use when you need to fetch operators for a specific custom channel type with pagination.

Action Parameters

custom_type
stringRequired
limit
integer
token
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Group Channel Operators

Description

Tool to list operators of a group channel. use after specifying the channel url when needing to paginate through operators.

Action Parameters

channel_url
stringRequired
limit
integer
token
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: List Open Channel Operators

Description

Tool to list operators of an open channel. use when you have the open channel url and need to fetch its operators. supports pagination via token and limit.

Action Parameters

channel_url
stringRequired
limit
integer
token
string

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Mark All User Messages As Read

Description

Tool to mark all of a user's messages as read in group channels. use when resetting unread message counts after a user has viewed all messages.

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Mute User

Description

Tool to mute a user in a group channel. use when you need to prevent a user from sending messages for a specified duration.

Action Parameters

channel_url
stringRequired
description
string
seconds
integer
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Register Operators by Custom Channel Type

Description

Tool to register users as operators to channels by custom channel type. use when assigning operator roles for all channels of a specified custom type.

Action Parameters

custom_type
stringRequired
operator_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Register Group Channel Operators

Description

Tool to register one or more users as operators in a sendbird group channel. use when elevating permissions of existing channel members.

Action Parameters

channel_url
stringRequired
user_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Register Operators to Open Channel

Description

Tool to register operators to an open channel. use after creating or updating an open channel when you need to assign operator roles.

Action Parameters

channel_url
stringRequired
user_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unban User from Group Channel

Description

Tool to unban a user from a group channel. use when reinstating a previously banned user. execute after confirming the user is currently banned.

Action Parameters

banned_user_id
stringRequired
channel_url
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Unregister Operators Custom Channel Type

Description

Tool to unregister operators from channels by custom channel type. use when you need to remove operator roles from users across channels of a specific custom type.

Action Parameters

custom_type
stringRequired
user_ids
arrayRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Count Preference Of Channel

Description

Tool to update a user's unread count preference for a specific group channel. use when you want to include or suppress a channel in the user's unread counts.

Action Parameters

channel_url
stringRequired
count_preference
stringRequired
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Update Group Channel

Description

Tool to update group channel information. use when you need to modify channel attributes such as name, cover image, privacy settings, or operator list after channel creation.

Action Parameters

access_code
string
channel_url
stringRequired
cover_url
string
custom_type
string
data
string
is_distinct
boolean
is_ephemeral
boolean
is_public
boolean
is_super
boolean
my_count_preference
string
name
string
operators
array

Action Response

access_code
string
channel_url
stringRequired
cover_url
string
custom_type
string
data
string
error
string
is_distinct
booleanRequired
is_ephemeral
booleanRequired
is_public
booleanRequired
is_super
booleanRequired
my_count_preference
string
name
string
operators
array
successful
booleanRequired

Tool Name: Sendbird Update Message

Description

Tool to update an existing group channel message in sendbird. use after you need to modify content or metadata of a sent message.

Action Parameters

apns_bundle_id
string
channel_url
stringRequired
content
string
custom_type
string
data
string
dedup_id
string
is_silent
boolean
mention_type
string
mentioned_user_ids
array
message_id
integerRequired
message_type
string
push_notification_delivery_option
string
sorted_metaarray
array
user_id
string

Action Response

apple_critical_alert_options
object
channel_url
stringRequired
content
string
created_at
integerRequired
custom_type
string
data
string
error
string
file
object
is_reply_to_channel
boolean
is_silent
booleanRequired
mention_type
string
mentioned_users
array
message_id
integerRequired
og_tag
object
parent_message_id
integer
parent_message_info
object
reactions
array
sorted_metaarray
array
successful
booleanRequired
thread_info
object
translations
object
type
stringRequired
updated_at
integerRequired
user
objectRequired

Tool Name: Update Sendbird User

Description

Tool to update a user's information. use when modifying nickname, profile image url, activation status, or metadata.

Action Parameters

is_active
boolean
issue_access_token
boolean
metadata
object
nickname
string
preferred_languages
array
profile_url
string
user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired

Tool Name: Sendbird View Group Channel

Description

Tool to view information about a specific group channel. use when you need channel details after confirming the channel url.

Action Parameters

channel_url
stringRequired
show_delivery_receipt
boolean
show_member
boolean
show_metadata
boolean
show_migration_info
boolean
show_read_receipt
boolean

Action Response

channel_url
stringRequired
cover_url
string
custom_type
string
data
string
delivery_receipt
object
error
string
is_broadcast
booleanRequired
is_distinct
booleanRequired
is_public
booleanRequired
is_super
booleanRequired
members
array
metadata
object
migration_info
object
name
string
read_receipt
object
successful
booleanRequired

Tool Name: Sendbird View Message

Description

Tool to view a specific message in a group channel. use after confirming channel url and message id.

Action Parameters

channel_url
stringRequired
message_id
integerRequired
with_sorted_metaarray
boolean

Action Response

channel_url
stringRequired
created_at
integerRequired
custom_type
string
data
string
error
string
mention_type
string
mentioned_users
array
message
string
message_id
integerRequired
og_tag
object
parent_message
object
reactions
array
sorted_metaarray
array
successful
booleanRequired
thread_info
object
translations
object
type
stringRequired
updated_at
integerRequired
user
objectRequired

Tool Name: View User

Description

Tool to retrieve information about a specific sendbird user. use when you need to fetch detailed user data by their user id.

Action Parameters

user_id
stringRequired

Action Response

data
objectRequired
error
string
successful
booleanRequired