SendBird provides the chat API and SDK for your app enabling real-time communication among your users.
Bower package for SendBird.com JavaScript SDK
bower install sendbird
npm module for SendBird.com JavaScript SDK
npm install sendbird
download for SendBird.com JavaScript SDK
Install via NPM and import like below in your TypeScript file:
import * as SendBird from 'SendBird';
var sb = new SendBird({'appId': 'APP_ID'});
// do something...
If you have trouble importing SendBird
, please check your tsconfig.json
file and change the value of "allowSyntheticDefaultImports"
to true
in compilerOptions
.
- Basic Sample using Sendbird SDK. download
- Widget Sample using Sendbird SDK. download
- LiveChat Sample using Sendbird SDK. download
If you want to check the record of other version, go to Change Log.
- Added
UserMessageParams
feature.- This is used in
sendUserMessage()
of channel. - message: set text message to send. This value is required.
- data: set message data to send.
- customType: set message customType to send.
- targetLanguages: set message translation target language list.
- mentionedUserIds: set mentioned userId.
- mentionedUsers: set mentioned User.
- This is used in
- Added
FileMessageParams
feature.- This is used in
sendFileMessage()
of channel. file
orfileUrl
is required.- file: set file to send.
- fileUrl: set file's url to send.
- fileName: set file's name to send. When you set a file and do not specify this value, it is specified by name of the file. When you set a fileUrl and do not specify this value, it is set as empty string.
- fileSize: set file's size to send. When you set a file and do not specify this value, it is specified by size of the file. When you set a fileUrl and do not specify this value, it is set as 0.
- mimeType: set file's type to send. When you set a file and do not specify this value, it is specified by type of the file. When you set a fileUrl and do not specify this value, it is specified by inferring from fileUrl.
- data: set message data to send.
- customType: set message customType to send.
- thumbnailSizes: set size of the thumbnail to be created. This value only works when you use file not fileUrl.
- mentionedUserIds: set mentioned userId.
- mentionedUsers: set mentioned User.
- This is used in
- Added
sendUserMessage(UserMessageParams, CallBackFunction)
in channel. - Added
sendFileMessage(FileMessageParams, CallBackFunction)
in channel. - Added
mentionedUsers
in UserMessage and FileMessage to check mentioned user. - Added
isEphemeral
in GroupChannel to indicate whether the channel supports message retention. - Added
myMemberState
in GroupChannel to check my joined state on GroupChannel. - Added
operator
feature in GroupChannel.- Added
operators
inGroupChannelParams
to set operator. - Added
operatorUserIds
inGroupChannelParams
to set operator.
- Added
- Added
banUser
inGroupChannel
to ban User. - Added
banUserWithUserId
inGroupChannel
to ban User using userId. - Added
unbanUser
inGroupChannel
to remove banned User using User object. - Added
unbanUserWithUserId
inGroupChannel
to remove banned User using userId. - Added
muteUser
inGroupChannel
to mute User using User object. - Added
muteUserWithUserId
inGroupChannel
to mute User using userId. - Added
unmuteUser
inGroupChannel
to unmute User using User object. - Added
unmuteUserWithUserId
inGroupChannel
to unmute User using userId. - Added
freeze
inGroupChannel
not to allow messages from members from the channel. - Added
unfreeze
inGroupChannel
to allow messages from members from the channel. - Added
isFrozen
inGroupChannel
to check if the channel is frozen or not. - From now, channel param in callbacks of the ChannelHandler below can come in either GroupChannel or OpenChannel.
- onUserMuted(channel, user)
- onUserUnmuted(channel, user)
- onUserBanned(channel, user)
- onUserUnbanned(channel, user)
- onChannelFrozen(channel)
- onChannelUnfrozen(channel)
- Added
createMemberListQuery()
inGroupChannel
to search members.