CreateBlogSupport
Log inSign up
Home
Webex Calling
  • Guides
  • Webex Calling Beta
  • Webex Cloud Calling
  • Broadworks Calling
  • UCM Calling
  • Beta Program
  • Webex Status API
  • XML API Deprecation

Webex Calling

Quickstart

Welcome to the Quick Start Guide for the Webex Meetings SDK. This guide is designed to provide developers with a concise walkthrough to swiftly set up, authorize, and test the core meeting functionalities within the Meeting SDK.

By following the sequential flow of this document and integrating the provided code snippets, you'll be able to authenticate your application and create and manage your first meetings. Whether you're new to Webex's Meeting SDK or looking to brush up on the basics, this guide ensures a streamlined experience to get you up and running in no time. Let's dive in!

anchorImport the Meetings SDK

anchor

To install the latest stable version of the Meetings SDK use either NPM or CDN.

NPM

We test against the Active LTS (Long Term Support) version of Node.js and use npm@6 to run security audits.

The Meetings SDK is available as a nodejs module via NPM. You can install it using either yarn or npm utilities:

 yarn add webex

or

npm install webex
CDN

A minified version of the Meeting SDK is also provided via the unpkg or jsdelivr Content Delivery Networks (CDN). To include the CDN Meeting SDK:

 <!-- unpkg -->
 <script crossorigin src="https://unpkg.com/webex/umd/webex.min.js"></script>
 <!-- jsdelivr -->
 <script crossorigin src="https://cdn.jsdelivr.net/npm/webex/umd/webex.min.js"></script>

If you're already using a bundler like Webpack or Rollup) you can simply import or require the package and use the above snippet, assigning the initialized webex variable to window.webex.

We also provide a meetings specific SDK via unpkg. Access by including the following code:

 <script crossorigin src="https://unpkg.com/webex/umd/meetings.min.js"></script>

anchorInitialize the SDK

anchor

If you don't already have a Cisco Webex account, visit the Webex Developer Portal to create your account and retrieve your access token from the following page: Getting and Using your Personal Access Token.

To create a new Webex object, replace <AUTHORIZATION/BOT TOKEN> below with your Personal Access Token from the Developer Portal:

const Webex = import(`webex`);
const webex = Webex.init({
  credentials: {
    access_token: `<AUTHORIZATION/BOT TOKEN>`
  }
});

You can only create rooms or meetings once the Webex object is ready. You'll want to attach a listener for the Webex object's ready event and proceed only after that event has fired. Here's a complete workflow:

  1. Listen for the ready event and log a message.
  2. Create a room titled "My First Room".
  3. Add Alice and then Bob to the new room.
  4. Send a "Hi Everyone" message to all the participants in the room.
// Listen for the ready event
webex.once('ready', () => {
    console.log('Authentication#initWebex() :: Webex Ready');
  });

webex.rooms.create({ title: `My First Room` }).then(room => {
  return Promise.all([
    webex.memberships.create({
      roomId: room.id,
      personEmail: `alice@example.com`
    }),
    webex.memberships.create({
      roomId: room.id,
      personEmail: `bob@example.com`
    })
  ]).then(() =>
    webex.messages.create({
      markdown: `**Hi Everyone**`,
      roomId: room.id
    })
  );
});

anchorWebex Object Attribute Reference

anchor

The following tables cover all of the available configuration attributes for the webex object.

Default Attributes

S.noAttributeDescriptionData TypeDefault Attribute?
1.credentialsUse this object to set up credentials for authentication.ObjectYes
1.aaccess_tokenAccess token used to communicate with Webex.StringNo
1.bclientTypeType of client communicating with Webex, an example would be "Web".StringYes
2.deviceUse this object to set the settings for the device created in Webex.ObjectYes
2.avalidateDomainsValidate domains against the allowed domains.BooleanYes
2.ballowedDomainsThe allowed domains to validate domains against.String[]No
2.cephemeralEnable or disable "ephemeral" mode which sets a TTL of 30 minutes on the registration of the device created in Webex.BooleanYes
3.storageUse this object to set storage properties for the webex object.ObjectYes
3.aboundedAdapterUsed to store information pertaining to the webex object.StorageAdapterLocalStorageYes
3.bunboundedAdapterUsed to store information outside the scope of the webex object.LocalForageStoreAdapterYes
Credentials

S.noAttributeDescriptionData TypeDefault Attribute?
1.access_tokenAccess token used to communicate with Webex.StringNo
2.clientTypeType of client communicating with Webex, an example would be "Web".StringYes
3.client_idUnique client ID assigned to the developer for Oauth 2.0.StringNo
4.client_secretUnique client secret assigned to the developer for Oauth 2.0.StringNo
5.scopeScopes define the privilege level of the access token. They determine what the client can and cannot do.StringNo
6.redirect_uriRedirect URI points to the landing page of the developer's application after successful authentication.StringNo
Storage

S.noAttributeDescriptionData TypeDefault Attribute?
1.boundedAdapterUsed to store information pertaining to the webex object.StorageAdapterLocalStorageYes
2.unboundedAdapterUsed to store information outside the scope of the webex object.LocalForageStoreAdapterYes
Meetings

S.noAttributeDescriptionData TypeDefault Attribute?
1.mediaSettingsUse this object to set media settings for meetings.ObjectNo
1.apstnEnable or disable a PSTN connection within the meeting.BooleanNo
2.reconnectionUse this object to set reconnection settings for a meeting.ObjectNo
2.aenabledEnable or disable reconnection to a meeting.BooleanNo
2.bautoRejoinEnable or disable automatic rejoin once a connection is restored.BooleanNo
3.loggingUse this object to set logging.ObjectNo
3.aenableEnable or disable logging.BooleanNo
3.bverboseEventsEnable or disable verbose level debugs.BooleanNo
4.resolutionObject to the resolution of the video.ObjectNo
4.amaxWidthMaximum width of the video.IntNo
4.bmaxHeightMaximum height of the video.IntNo
4.cidealWidthIdeal width of the video.IntNo
4.didealHeightIdeal height of the video.IntNo
5.screenResolutionObject to set resolution of screen share.ObjectNo
5.amaxWidthMaximum width of the screenshare video.IntNo
5.bmaxHeightMaximum height of the screenshare video.IntNo
5.cidealWidthIdeal width of the screenshare video.IntNo
5.didealHeightIdeal height of the screenshare video.IntNo
6.bandwidthObject to set bandwidth constraints for a meeting.ObjectNo
6.aaudioMaximum bandwidth value for audio.IntNo
6.bvideoMaximum bandwidth value for video, independent of resolution.IntNo
6.cstartBitrateSets the starting bitrate for the media connection.IntNo
7.videoShareFrameRateSets the frame rate of the screenshare.IntNo
8.aspectRatioSets the aspect ratio of the video.FloatNo
9.autoUploadLogsWhen enabled, as calls are ended, SDK logs are uploaded and correlated.BooleanNo
10.enableRtxEnable or disable RTP packet retransmission.BooleanNo
11.receiveTranscriptionEnable receipt of transcription from Webex meeting services.BooleanNo
12.enableExtMapEnable or disable the advertising of RTP extension mapping within the SDP during WebRTC negotiation.BooleanNo
13.experimentalObject to turn expermiental features on or off.ObjectNo
13.aenableMediaNegotiatedEventEnable or disable emission of event from meeting object when media is negotiated successfully.BooleanNo
13.benableUnifiedMeetingsEnable or disable the improved meeting experience associated with a space. Refer to this [help article](https://help.webex.com/en-us/article/gxw5jz/Webex-App--Improved-meetings-associated-with-a-space) for more details.Boolean
13.cenableAdhocMeetingsEnable or disable the creation of an instant meeting.BooleanNo
14.degradationPreferencesObject to set behavior of meetings when experiencing degradation.ObjectNo
14.amaxMacroblocksLimitSet the maximum number of blocks that can be requested by the web application during a meeting. Defaults to 8192.IntNo
Other Attributes

S.noAttributeDescriptionData TypeDefault Attribute?
1.appPlatformPlatform or name of the application consuming the Webex Web Meetings SDK.StringNo
2.appVersionVersion of the application consuming the Webex Web Meetings SDK.StringNo
3.fedRampSet this flag to true if you are operating in the FedRAMP environment.BooleanNo
4.appNameName of the application consuming the Webex Web Meetings SDK.StringNo

Here's a complete example Webex object:

{
  appPlatform: 'testClient',
  fedRamp: true,
  credentials: {
    access_token: 'your_webex_access_token',
    clientType: 'confidential',
    client_id: 'id',
    client_secret: 'secret',
    scope: 'spark:all spark:kms',
    redirect_uri,
  },
  logger: {
    level: 'debug',
    historyLength: 1000,
  },
  appName: 'sdk-samples',
  storage: {
    boundedAdapter: new StorageAdapterLocalStorage('webex'),
    unboundedAdapter: new LocalForageStoreAdapter('web-client-internal'),
  },
  meetings: {
    mediaSettings: {
      pstn: false,
    },
    reconnection: {
      enabled: false,
      autoRejoin: true,
    },
    metrics: {
      clientName: 'WEBEX_JS_SDK',
      clientType: 'WEBEX_SDK',
    },
    logging: {
      enable: true,
      verboseEvents: true,
    },
    resolution: {
      maxWidth: 1280,
      maxHeight: 720,
      idealWidth: 1280,
      idealHeight: 720,
    },
    screenResolution: {
      maxWidth: 1920,
      maxHeight: 1080,
      idealWidth: 1920,
      idealHeight: 1080,
    },
    bandwidth: {
      audio: 64000,
      video: 4000000,
      startBitrate: 2000,
    },
    videoShareFrameRate: 30,
    aspectRatio: 1.7695852534562213,
    autoUploadLogs: true,
    enableRtx: true,
    receiveTranscription: false,
    enableExtmap: false,
    experimental: {
      enableMediaNegotiatedEvent: false,
      enableUnifiedMeetings: false,
      enableAdhocMeetings: false,
      enableTurnDiscovery: true,
    },
  },
};

anchorUse a Proxy Agent to Open a WebSocket Connection

anchor

For consumers who are not using the SDK via the browser, it may be necessary to configure a proxy agent to connect with Mercury and open a WebSocket in a proxy environment. This can be done by configuring an agent as part of a DefaultMercuryOptions config object. The agent object will then be injected into the SDK and used in the Mercury plug-in during WebSocket construction as an option property, allowing a connection to be established via the specified proxy URL:

const webex = require(`webex`);
const HttpsProxyAgent = require('https-proxy-agent');

let httpsProxyAgent = new HttpsProxyAgent(url.parse(proxyUrl));

webex.init({
  config: {
    defaultMercuryOptions: {
      agent: httpsProxyAgent
    }
  }
});
In This Article
  • Import the Meetings SDK
  • Initialize the SDK
  • Webex Object Attribute Reference
  • Use a Proxy Agent to Open a WebSocket Connection

Connect

Support

Developer Community

Developer Events

Contact Sales

Handy Links

Webex Ambassadors

Webex App Hub

Resources

Open Source Bot Starter Kits

Download Webex

DevNet Learning Labs

Terms of Service

Privacy Policy

Cookie Policy

Trademarks

© 2025 Cisco and/or its affiliates. All rights reserved.