-
Notifications
You must be signed in to change notification settings - Fork 355
Authorization (Calling)
Authorization and device creation are crucial initial steps in leveraging the full capabilities of the 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.
Developers can efficiently obtain an access token by leveraging Common Identity, which employs the OAuth 2.0 authorization framework for secure and standardized token-based authentication. To kickstart the OAuth 2.0 flow, you can refer to the developer.webex.com website where detailed documentation and interactive tools guide you through the necessary steps, such as user consent and redirection, to generate a short-lived authorization code.
For instance, after receiving the authorization code, you can use 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.
More details about logging in with Webex can be found here.
Note: In order 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
- spark:xsi
Registering an endpoint with Webex Calling is a pivotal step in authorizing a user to access voice and video communication features. Once the user is provisioned in an organization licensed for Webex Calling, the CallingClient
module can be used to initiate the registration process. This 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 in this (TODO) section.
Caution
- Introducing the Webex Web Calling SDK
- Core Concepts
- Quickstart guide
- Authorization
- Basic Features
- Advanced Features
- Introduction
- Quickstart Guide
- Basic Features
- Advanced Features
- Multistream
- Migrating SDK version 1 or 2 to version 3