SendBird JavaScript SDK
SendBird provides the chat API and SDK for your app enabling real-time communication among your users.
Getting Started
bower package for SendBird JavaScript SDK
bower install sendbird
npm module for SendBird JavaScript SDK
npm install sendbird --save
Download for SendBird JavaScript SDK if you wish to use it without a package manager.
NOTICE! You should also add axios library into the script
tag before the SendBird library inclusion since v3.0.127
. You can host the library by your own, or utilize the CDN as the library refers to it. The below is an example.
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="/your-own-path-to-sendbird/SendBird.min.js"></script>
TypeScript
Install via NPM and import like below in your TypeScript file:
import * as SendBird from "sendbird";
var sb = new SendBird({ appId: "APP_ID" });
If you have trouble importing SendBird
, please check your tsconfig.json
file and change the value of "allowSyntheticDefaultImports"
to true
in compilerOptions
.
SyncManager
SyncManager
is a support add-on for SendBird SDK. Major benefits of SyncManager
are,
- Local cache integrated: store channel/message data in local storage for fast view loading.
- Event-driven data handling: subscribe channel/message event like
insert
, update
, remove
at a single spot in order to apply data event to view.
Check out Basic Sample with SyncManager which is similar to Basic Sample but SyncManager
integrated. For more information about SyncManager
, please refer to SyncManager README.
v3.0.129(JUL 24, 2020)
If you want to check the record of other version, go to Change Log.
- Renamed
includeReaction
to includeReactions
in channel.getMessageChangeLogs()
(includeReaction
is deprecated). - Added
ogMetaData
in BaseMessage
.
ogMetaData
holds open graph properties including title
, url
, description
, and defaultImage
.ogMetaData.defaultImage
has the image-related properties including url
, secureUrl
, type
, width
, height
, alt
as defined in the target website.ogMetaData
may not be set at the moment of sending. Once the message is sent, Sendbird service would fetch and analyze the open graph property and give the result as a form of message update event.
License
SendBird License