Bots are automated users in Sendbird Chat that can interact with normal users in group channels. The bot interface is designed on the basis of RESTful principles.
The bot feature allows you to create a bot with a callback URL to monitor events from users. You can make the bot join channels and send messages to add convenience to users' chat experience. Processing incoming data and generating relevant responses are under your control.
You can configure your bot to build helpful, engaging features for your users. The following are some examples of bots you can create.
- Helper bot: Users can ask a helper bot questions and receive immediate answers.
- GIF search bot: Users can search GIFs with a command. For example, you can configure a bot to return a list of cat GIFs when "/gif cats" is typed.
- Assistant bot: An assistant bot can monitor chat messages and automatically suggest nearby restaurants or venues related to the context of the chat.
- AI chatbot: An AI chatbot can provide customers with a more engaging and personalized conversation experience. Currently, Sendbird Chat offers AI chatbot powered by OpenAI's ChatGPT and Google Bard. To learn more, see our documentation.
Note: To implement chatbots with Google Dialogflow, see this tutorial.
The following table shows the list of properties in a bot resource.
The information on the bot.
The unique ID of the bot.
The bot's nickname.
The URL of the bot's profile image.
The bot's type that indicates its category.
An opaque string that identifies the bot. This token should be added to all requests sent to
The server URL where the bot is located to receive all events, requests, and data forwarded from an application.
Indicates whether to only forward messages that meet specific conditions or forward all messages to the bot. If set to
Indicates whether to mark the bot's message as read upon sending it.
Indicates whether to include information about the members of each channel in a callback response.
Indicates whether the bot automatically joins the channel when invited or joins the channel after manually accepting an invitation using the API. The value of
The timestamp at which the bot was created in Unix seconds format.
Bot callback URL requirements
The following are the requirements for your bot callback URL:
- Your URL is required to handle
- Your URL is required to return a
200 OKHTTP code if you successfully receive a callback. Otherwise, Sendbird server calls your URL several times until it gets a
- For security reasons, we recommend that you use an SSL server.
Bot callback JSON body
The type of the bot notification. The only valid value is
The unique App ID of the application where the message was sent.
The time that the message was sent in Unix milliseconds format. You can use this property to sort messages sent to the bot.
The user who sent the message.
The bot that received the message.
array of objects
An array of users who are members of the channel.
array of strings
An array of unique IDs of the users mentioned in the message.
The sent message that triggered the callback.
The group channel where the event occurred.
The following table shows a list of actions supported for bots. API endpoints are relative to the base URL allocated to your Sendbird application. In this page, the
/bots endpoint refers to
Note: If you want to know the ID and base URL of your application, sign in to the Sendbird Dashboard, go to the Settings > Application > General, and then check the Application ID and API request URL.
- It's recommended that the parameter values in API URLs be urlencoded, such as