DocumentationBlogSupport
Log inSign up
Log inSign up
BlogSupport
Build
Getting StartedPlatform Introduction
Embedded Apps
What's NewOverviewDeveloper GuideSidebar API Quick StartSubmission Checklist for Embedded Apps
Design Guidelines
MessagingMeetingsDevicesSidebarSidebar on Mobile
API Reference
BotsButtons and CardsIntegrationsBYODSService AppsService App GuestsService Apps G2GGuest IssuerWidgetsWebex ConnectLogin with WebexInstant ConnectInstant Connect Meeting LinksDeveloper SandboxBeta ProgramSubmit Your AppSupport PolicyFAQs
APIs
API Behavior ChangesPartners API GuideXML API DeprecationAccess the APIREST API BasicsCompliance
Webex APIs
Reference
Data Sources
Admin
OverviewAdmin APIsHybrid ServicesAuthentication
Guides
Hybrid ServicesWebhooksReal-time File DLP BasicsProvisioning APIsBackground ImagesAudit Events Error Reference
Reference
Admin Audit EventsAuthorizationsEventsGroupsHistorical AnalyticsHybrid ClustersHybrid ConnectorsLicensesMeeting QualitiesOrganization ContactsOrganizationsPartner ManagementPartner Reports/TemplatesPartner TagsPeopleRecording ReportRecordingsReport TemplatesReportsResource Group MembershipsResource GroupsRolesSecurity Audit EventsSession TypesSettingsSpace ClassificationsTracking CodesWorkspace LocationsWorkspace Metrics
Webex Calling Beta
Overview
Guides
Integrations and AuthorizationMetadata and Samples
Webex Calling
OverviewSDKs and ToolsWhat's New
Guides
Integrations and AuthorizationProvisioning APIsMetadata and SamplesBackground Images
Reference
Call ControlsCall RoutingCall Settings For MeCalling Service SettingsClient Call SettingsConference ControlsConverged RecordingsDECT Devices SettingsDevice Call SettingsDevicesEmergency Services SettingsFeatures: Announcement PlaylistFeatures: Announcement RepositoryFeatures: Auto AttendantFeatures: Call ParkFeatures: Call PickupFeatures: Call QueueFeatures: Call RecordingFeatures: Customer Experience EssentialsFeatures: Hunt GroupFeatures: Operating ModesFeatures: Paging GroupFeatures: Single Number ReachLocation Call SettingsLocation Call Settings: Call HandlingLocation Call Settings: SchedulesLocation Call Settings: VoicemailLocationsNumbersPSTNPartner Reports/TemplatesPeopleRecording ReportReportsReports: Detailed Call HistorySend Activation EmailUser Call SettingsVirtual Line Call SettingsWorkspace Call SettingsWorkspaces
Webex for Broadworks
Overview
Guides
Integrations and AuthorizationDeveloper's Guide
Reference
BroadWorks Billing ReportsBroadWorks EnterprisesBroadWorks SubscribersBroadWorks Workspaces
Webex for Wholesale
Overview
Guides
Developer's Guide
Reference
Wholesale Billing ReportsWholesale Provisioning
Webex for UCM
Guides
Integrations and Authorization
Reference
UCM Profile
Contact Center
Overview
Reference
Data Sources
Customer Journey Data
Overview
Guides
Getting StartedFAQ
Devices
Overview
Guides
Devices
Reference
Device Call SettingsDevice ConfigurationsDevicesWorkspace LocationsWorkspace MetricsWorkspace PersonalizationWorkspacesxAPI
Directory Services
Reference
Domain ManagementIdentity Organization
Meetings
Overview
Guides
Integrations and AuthorizationWebhooksWebinar GuideMeeting Resource Guide
Reference
Meeting ChatsMeeting Closed CaptionsMeeting InviteesMeeting MessagesMeeting ParticipantsMeeting PollsMeeting PreferencesMeeting Q and AMeeting QualitiesMeeting TranscriptsMeetingsMeetings Summary ReportPeopleRecording ReportRecordingsSession TypesTracking CodesVideo MeshWebhooks
Messaging
Overview
Guides
BotsIntegrations and AuthorizationWebhooksButtons and Cards
Reference
Attachment ActionsEventsMembershipsMessagesPeopleRoom TabsRoomsTeam MembershipsTeamsWebhooks
SCIM 2
Overview
Reference
SCIM 2 BulkSCIM 2 GroupsSCIM 2 Users
Workspace Integrations
OverviewTechnical DetailsControl Hub Features
Webex Status API
Full API Reference
Admin Audit EventsAttachment ActionsAuthorizationsBroadWorks Billing ReportsBroadWorks EnterprisesBroadWorks SubscribersBroadWorks WorkspacesCall ControlsCall RoutingCall Settings For MeCalling Service SettingsClient Call SettingsConference ControlsConverged RecordingsDECT Devices SettingsData SourcesDevice Call SettingsDevice ConfigurationsDevicesDomain ManagementEmergency Services SettingsEventsFeatures: Announcement PlaylistFeatures: Announcement RepositoryFeatures: Auto AttendantFeatures: Call ParkFeatures: Call PickupFeatures: Call QueueFeatures: Call RecordingFeatures: Customer Experience EssentialsFeatures: Hunt GroupFeatures: Operating ModesFeatures: Paging GroupFeatures: Single Number ReachGroupsGuests ManagementHistorical AnalyticsHybrid ClustersHybrid ConnectorsIdentity OrganizationIssuesLicensesLocation Call SettingsLocation Call Settings: Call HandlingLocation Call Settings: SchedulesLocation Call Settings: VoicemailLocationsMeeting ChatsMeeting Closed CaptionsMeeting InviteesMeeting MessagesMeeting ParticipantsMeeting PollsMeeting PreferencesMeeting Q and AMeeting QualitiesMeeting TranscriptsMeetingsMeetings Summary ReportMembershipsMessagesNumbersOrganization ContactsOrganizationsPSTNPartner ManagementPartner Reports/TemplatesPartner TagsPeopleRecording ReportRecordingsReport TemplatesReportsReports: Detailed Call HistoryResource Group MembershipsResource GroupsRolesRoom TabsRoomsSCIM 2 BulkSCIM 2 GroupsSCIM 2 UsersSecurity Audit EventsSend Activation EmailSession TypesSettingsSiteSpace ClassificationsTeam MembershipsTeamsTracking CodesUCM ProfileUser Call SettingsVideo MeshVirtual Line Call SettingsWebhooksWholesale Billing ReportsWholesale ProvisioningWorkspace Call SettingsWorkspace LocationsWorkspace MetricsWorkspace PersonalizationWorkspacesxAPI
API Changelog
SDKs
Space Meetings Migration
Calling
Introduction
Platform
Web
IntroductionQuickstart
Basics
AuthorizationCore ConceptsCalls
Advanced Features
Call SettingsContactsSupplementary ServicesVoicemailBackground Noise Reduction
Kitchen Sink
Meetings
Introduction
Platform
Web
IntroductionQuickstart
Basics
AuthorizationJoin a MeetingMigration To Improved MeetingsPasswords & CaptchasUnified Space Meetings
Advanced Features
Advanced ControlsDialing In and OutStreams & EffectsVideo Resolution
Multistream
Multistream Comprehensive GuideMultistream Quickstart
Migrating SDK V2 to V3
iOSAndroidBrowserNode.jsClick to Call
Developer CommunityCertifications

SDKs

Web Calling SDK | Authorization and Device Registration

Authorization and device creation are crucial initial steps in leveraging the full capabilities of the calling SDK. Authorization ensures secure access and permissions for developers, while device creation establishes the necessary endpoint for enabling voice and video communication features in your application.

anchorObtain an Access Token

anchor

Developers can obtain an access token by leveraging Common Identity, which employs the OAuth 2.0 authorization framework for secure and standardized token-based authentication. To get up and running with the OAuth 2.0 flow, you can refer to this detailed guide which runs through the necessary steps, including user consent and redirection, to generate a short-lived authorization code.

After receiving the authorization code, you can use the curl utility with the following example API call to exchange it for an access token:

curl -X POST https://webexapis.com/v1/access_token \
  -d "grant_type=authorization_code" \
  -d "client_id=YOUR_CLIENT_ID" \
  -d "client_secret=YOUR_CLIENT_SECRET" \
  -d "code=AUTHORIZATION_CODE" \
  -d "redirect_uri=YOUR_REDIRECT_URI"

Once you obtain the access token, it acts as the credential for secure API interactions with various Webex services, including the CallingClient module. The developer.webex.com website serves as a comprehensive resource throughout this OAuth 2.0 process, enabling you to seamlessly integrate Webex features into your application while mitigating security concerns.

To authorize with Webex Calling, a developer must select the appropriate scopes while creating the Integration, or pass these scopes if directly creating an access token. Scopes define the level of access that an integration requires. Webex Calling requires these scopes: spark:webrtc_calling, spark:calls_read, spark:calls_write, and spark:xsi.

anchorAuthorize with Webex Calling

anchor

Registering an endpoint with Webex Calling is a pivotal step in authorizing a user to access voice and video communication features. Once a user is provisioned in an organization licensed for Webex Calling, the CallingClient module can be used to initiate the registration process. That involves obtaining an access token via OAuth 2.0 authentication. Upon successful authentication, the CallingClient module registers the endpoint, thereby enabling it to place and receive calls through the Webex cloud. Once registration is complete, the SDK automatically sends requests at regular intervals to maintain the endpoint's active registration status.

Additional details regarding the registration process can be found below.

Obtaining a Line Object

A line object is created at the time of the callingClient initialization itself. It can be obtained by fetching the list of all the lines using getLines method in the callingClient module. However, the SDK only supports a single line at the moment.

For example:

const callingClient  = calling.callingClient;
const lines = callingClient.getLines();

The constant, lines, is an object where the keys are the lineId of each line and the values are the line Objects themselves.

Please refer to the getting started documentation for information on the creation and initialization of the Calling object. The example above is just pseudocode indicating that callingClient is a part of the main calling object).

Each of the line objects contain the following information:

PropertiesDescriptionType
lineIdUnique ID provisioned per line in order to distinguish and identify them within the application.string<uuid>
mobiusDeviceIdUnique ID provisioned per line for communication between the SDK and the backend.string<uuid>
phoneNumberExternal phone number for the line.string
extensionInternal extension for the line.string
statusRegistration status of the line (initially set to inactive).string
sipAddressesAddress provided by Webex Calling when the line is registered.string\[\]
voicemailVoicemail Pilot number for each line.string
lastSeenLast interaction of the line with Webex Calling.string
keepaliveIntervalTime interval after which the registration for a line expires.number
callKeepaliveIntervalInterval within which the Calling SDK needs to send a ping to keep the call alive on Webex Calling.number
rehomingIntervalMinThe minimum interval for the Line to return to the primary Webex Calling server.number
rehomingIntervalMaxThe maximum interval for the Line to return to the primary Webex Calling server.number
voicePortalNumberReserved for Webex Contact Center.number
voicePortalExtensionReserved for the Webex Contact Center.number

anchorRegister a Device

anchor

The line object can be used to perform various line operations including device registration. The device registration process can be begun by using the line object's `register()' method:

line.register();

AsynchronousNo
ParametersNo parameters required
Returnsundefined

The register() method only begins the registration process. It does not mean the registration is complete.

Determine if Registration is Successful

The register method only begins the registration process. To verify that the device registration is successful, register a callback to listen for the registered event:

line.on('registered', (line: ILine) => {
    // Store the line registration details
}

With the help of the registered event, you'll know the both that the registration has completed sucessfully and also have access to the line detials.

The event subscription must happen before making the register() call.

anchorDeregister a Device

anchor

You can derigister a registered device using the line object's deregister() method:

line.deregister();

AsynchronousNo
ParametersNo parameters required
Returnsundefined

The deregister() method only begins the registration process. It does not mean that deregistration is complete.

Determine if Deregistration is Successful

The deregister method only begins the registration process. To verify that the device registration is successful, register a callback to listen for the unregistered event:

line.on('unregistered', () => {
    // Add any action that should happen after a line is unregistered
}

The event subscription must happen before making the deregister() call.

anchorThe Connecting Event

anchor

By listening for the connecting event, the app can determine that it's in the connecting state once the register() call is made:

line.on('connecting', () => {
    // Store the line registration details
}

This event has no payload. If the event listener is triggered, it means the line is connecting.

anchorThe Error Event

anchor

By listening for the error event, the app can monitor any errors encountered during the registration process:

line.on('error', (error) => {
    // Try to re-connect and/or show error to end user
}

This event returns an error payload. If this event listener is triggered, it means the line connection encountered one of the following errors:

StatusTypeMessage
inactiveregistrationErrorDevice limit exceeded. The user already logged in to a different device.
inactiveregistrationErrorDevice not found.
inactivetokenErrorToken expired. Authentication/Authorization error.

An example error object is returned in JSON:

{
 "status": "inactive",
 "type": "tokenError",
 "msg": "Token expired. Authentication/Authorization error."
}
In This Article
  • Obtain an Access Token
  • Authorize with Webex Calling
  • Register a Device
  • Deregister a Device
  • The Connecting Event
  • The Error Event

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.