Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
sendbird-platform-sdk
Advanced tools
This is a Node.js package that makes talking to the Sendbird Platform API easier. With this library you can extend your Sendbird integration to include advanced features like channel automation and user management.
npm install sendbird-platform-sdk
import SendbirdPlatformSdk from 'sendbird-platform-sdk';
const userId = "1234";
const name = "bob";
const profileUrl = "https://picsum.photos/200";
const apiToken = "YOUR_API_TOKEN";
const appId = "YOUR_APP_ID";
const opts = {
'createUserData': new SendbirdPlatformSdk.CreateUserData(userId, name, profileUrl),
};
async function createUser() {
const userApiInstance = new SendbirdPlatformSdk.UserApi();
userApiInstance.apiClient.basePath = `https://api-${appId}.sendbird.com`;
try {
const data = await userApiInstance.createUser(apiToken, opts);
console.log(data);
} catch (e) {
console.log(e);
}
}
createUser();
In order to make requests with this SDK you will need you master API token. This can be found through the Sendbird dashboard. Each app you create in Sendbird has its own master api token. These tokens can be found in Settings > Application > General.
You will need Node.js installed. This has been developed and tested with NodeJS 17+.
To run locally we need to make use of the npm link command. You will require two terminal tabs.
Please follow these steps:
git clone git@github.com:sendbird/sendbird-platform-sdk
cd sendbird-platform-sdk
npm install
npm run build
npm link
mkdir app-using-sendbird-chat
npm init -y
npm link path/to/sdk/sendbird-platform-sdk
The linking step is demonstrated visually here.
All the documentation for this project lives in the /docs directory of this repo.
Documentation | |
---|---|
Announcement | docs/AnnouncementApi.md |
Application | docs/ApplicationApi.md |
Bot | docs/BotApi.md |
GroupChannel | docs/GroupChannelApi.md |
Message | docs/MessageApi.md |
OpenChannel | docs/OpenChannelApi.md |
User | docs/UserApi.md |
Webhooks | docs/WebhooksApi.md |
FAQs
Server side JavaScript SDK for Sendbirds Platform API
We found that sendbird-platform-sdk demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.