Skip to main content
Quick Setup Reference
npm install @cometchat/calls-sdk-javascript
import { CometChatCalls } from "@cometchat/calls-sdk-javascript";

const callAppSetting = new CometChatCalls.CallAppSettingsBuilder()
  .setAppId("APP_ID")
  .setRegion("REGION")
  .build();

CometChatCalls.init(callAppSetting).then(() => console.log("Calls SDK ready"));
Required: App ID, Region from CometChat Dashboard
CometChatCalls.init() must be called before any other Calls SDK method. Make sure the Chat SDK is also initialized via CometChat.init() first (unless using Standalone Calling).

Get your Application Keys

Signup for CometChat and then:
  1. Create a new app
  2. Head over to the Credentials section and note the App ID, Auth Key & Region

Add the CometChatCalls Dependency

Install the package as NPM module:
npm install @cometchat/calls-sdk-javascript
Then, import the CometChatCalls class wherever you want to use CometChatCalls.
import { CometChatCalls } from "@cometchat/calls-sdk-javascript";

Initialize CometChatCalls

The init() method initializes the Calls SDK. It takes a CallAppSettings instance as its parameter. CallAppSettingsBuilder accepts three settings:
SettingDescription
appIDYour CometChat App ID
regionThe region where your app was created
host(Optional) Custom client URL for dedicated deployments
Call init() before any other CometChatCalls method — ideally on app startup.
let appID = "APP_ID";
let region = "REGION";

const callAppSetting = new CometChatCalls.CallAppSettingsBuilder()
  .setAppId(appID)
  .setRegion(region)
  .build();

CometChatCalls.init(callAppSetting).then(
  () => {
    console.log("CometChatCalls initialization completed successfully");
  },
  (error) => {
    console.log("CometChatCalls initialization failed with error:", error);
  }
);
Make sure you replace the APP_ID with your CometChat App ID and REGION with your App Region in the above code.
ParameterDescription
callAppSettingsAn object of the CallAppSettings class

Next Steps

Default Calling

Implement the complete ringing call flow

Direct Calling

Start call sessions without the ringing flow

Standalone Calling

Use Calls SDK without the Chat SDK

Calling Overview

Compare calling approaches and features