Home
/
Calls
/
JavaScript

Install and configure the Calls SDK

This page explains how to create a Sendbird application in your dashboard and install the Calls SDK. If you’re ready to integrate Calls to your app, follow the step-by-step instructions below.


Step 1: Create a Sendbird application from your dashboard

A Sendbird application comprises everything required in a Calls service including users, message, and channels. To create an application:

  1. Go to the Sendbird Dashboard and enter your email and password, and create a new account. You can also sign up with a Google account.
  2. When prompted by the setup wizard, enter your organization information to manage Sendbird applications.
  3. Lastly, when your dashboard home appears after completing setup, click Create + at the top-right corner.

Only one Sendbird application can be integrated per app for your service regardless of the platform. All users within your Sendbird application can communicate with each other across all platforms. This means that your iOS, Android, and web client app users can all make and receive calls with one another without any further setup. It should be noted that all data are limited to the scope of a single application, and users in different Sendbird applications can't make and receive calls to each other.

Note: For application administrators, the Sendbird Dashboard provides call logs to keep track of all calls made on the application.


Step 2: Download and install the Calls SDK using npm or yarn

Installing the Calls SDK is simple if you’re familiar with using external libraries or SDK’s in your projects. You can install the Calls SDK with npm or yarn by entering the command below on the command line.

Note: For npm, you can automatically download our Calls SDK with just an npm install command by adding sendbird-calls dependency to the package.json file of your project. For yarn, a similar method can be applied to download the Calls SDK.

Light Color Skin
Copy
# npm
npm install sendbird-calls 

# yarn
yarn add sendbird-calls 

Import the Calls SDK in ES6 module as shown below:

Light Color Skin
Copy
import SendBirdCall from "sendbird-calls";

SendBirdCall.init(APP_ID)
...

Note: If you are using TypeScript, set --esModuleInterop option to true for default imports or use import * as SendBirdCall from "sendbird-calls".

Or add the following code in the header to install and initialize the Calls SDK.

Light Color Skin
Copy
<script type="text/javascript" src="SendBirdCall.min.js"></script>
<script type="text/javascript">
    SendBirdCall.init(APP_ID)
</script>

Step 3: Acquire media device permissions

The Calls SDK requires access permissions to microphone and camera to communicate with Sendbird server. To grant these permissions, call the SendBirdCall.useMedia() function. This will allow the user to retrieve a list of available media devices or to retrieve any actual media streams.

Note: When a user makes or receives a call for the first time by your JavaScript application running in a browser, the browser might prompt the user to grant microphone and camera access permissions.