Test Environment. You are currently using the Webex for Developers test environment. Apps created here will not be available for use with Webex Teams. Please visit Webex for Developers to manage your apps.

Integrations & Authorization

Add features from third-party services to Webex Teams or perform actions on behalf of another user with Integrations.

Create an Integration

anchorWhat are Integrations?

Integrations are how you request permission to invoke the Webex REST API on behalf of another Webex Teams user. To do this in a secure way the API supports the OAuth 2 standard which allows third-party integrations to get a temporary access token for authenticating API calls instead of asking users for their password.

If you're sure that your integrations require authenticating on behalf of another Webex user, read on, we'll get you there in a few easy steps:

  1. Register your integration with Webex Teams
  2. Request permission using an OAuth Grant Flow
  3. Exchange the resulting authorization code for an access token
  4. Use the access token to make your API calls
anchorRegistering your Integration

Registering an integration with Webex Teams is super easy. If you're logged in, select My Webex Apps from the menu under your avatar at the top of this page, click "Create a New App" then "Create an Integration" to start the wizard. You'll need to provide some basic information like your integration's name, description, and logo. This information should be user-facing since that's what they'll see in the permission dialog.

After successful registration you'll be taken to a different screen containing your integration's newly created Client ID and Client Secret. The Client Secret will only be shown once so please copy and keep it safe!

anchorRequesting Permission

This step requires that your integration have a user interface capable of temporarily sending users to a Webex login page. For web apps this is typically done as a popup or redirect. For mobile apps consider using a "WebView" or equivalent on your mobile platform of choice.

To kick off the flow send your user to the following URL along with a standard set of OAuth query parameters:


The required query parameters are:

Query ParameterValue
response_typeMust be set to "code"
client_idIssued when creating your app
redirect_uriMust match one of the URIs provided during integration registration
scopeA space-separated list of scopes being requested by your integration (see below)
stateA unique string that will be passed back to your integration upon completion (see below)

After logging in, users will see a grant dialog like this one:


Scopes define the level of access that your integration requires. The following is a complete list of scopes and their user-facing descriptions as shown in the permission dialog.

Retrieve your Webex meeting lists and details
Create, manage, or cancel your scheduled Webex meetings
Retrieve your Webex meeting recordings for playback
Manage or delete your meeting recordings for playback
Retrieve your Webex meeting preferences
Edit your Webex meeting preferences
Full access to your Webex Teams account
List all calls for rooms you are a part of
See details for your devices
Modify and delete your devices
List people in the rooms you are in
Invite people to rooms on your behalf
Read the content of rooms that you are in
Post and delete messages on your behalf
Access to read your user's organizations
Read your users' company directory
See details for places and place services you manage
Create, modify and delete places and place services you manage
List the titles of rooms that you are in
Manage rooms on your behalf
List the people in the teams your user belongs to
Add people to teams on your users' behalf
List the teams your user's a member of
Create teams on your users' behalf
Retrieve all information from RoomOS-enabled devices.
Execute all commands on RoomOS-enabled devices.
See details for any device in your organization
Create, update and delete devices and device configurations in your organization
Access to read licenses available in your user's organizations
Access to read your user's organizations
Access to read your user's company directory
Access to write to your user's company directory
See details for any places and place service in your organization
Create, update and delete any place and place service in your organization
Access to read your organization's resource group memberships
Access to update your organization's resource group memberships
Access to read your organization's resource groups
Access to read roles available in your user's organization
Access to read organization's call qualities
Access to read events in your user's organization
Access to read memberships in your user's organization
Access to create/update/delete memberships in your user's organization
Access to read messages in your user's organization
Post and delete messages in all spaces in your user's organization
Access to read rooms in your user's organization
Access to read team memberships in your user's organization
Access to update team memberships in your user's organization
Access to read teams in your user's organization
Access to a one time password to a place to create an activation code
Allow users to invoke call commands on themselves
Access to read hybrid clusters for your organization
Access to read hybrid connectors for your organization
Access to the audit log for an organization

Scopes that begin with spark-admin can only be used by users with administrative access to an organization. Requesting these scopes during a grant flow will not give non-admin users access to administrative functions.

The spark-compliance scopes can only be used by an organization's compliance officers. See the Compliance Guide for more information.

The spark:all scope grants access to certain Webex account features that are not granted via the other user-level scopes. Applications which use the Webex SDKs for calling features may require this scope. Most other applications will not need to use this scope. Consult the SDK documentation for information about whether your application will need to use this scope.

As a general best practice, your integration should request only the scope, or scopes, it needs. For example, if you are creating an integration that notifies users of updates in a third-party service, and never responds to any commands, we recommend using only the spark:messages_write scope.

KMS Scope

After registering an integration, it will include the scopes you selected along with an additional scope: spark:kms. This scope is required to give your integration permission to interact with encrypted content (such as messages). For convenience, the scope is included in the integrations's scope list in the example OAuth Authorization URL on the integration's application detail page. If you don't use the example URL, be sure to include the scope when creating authorization URLs for your integration.


The state parameter is used to verify that the response from grant flow has not been tampered with along the way. It is recommended that your integration set this to a value that is verifiable once the user gives permission and the web browser is sent to your redirect_uri. A second use for this parameter is to encode basic state information like an internal user ID or the URL of the last page they were on before entering the grant flow.

anchorGetting an Access Token

If the user granted permission to your integration, the Webex REST API will redirect the user's web browser to the redirect_uri you specified when entering the grant flow. The request to the redirect URL will contain a code parameter in the query string like so:


Your integration will then need to exchange this authorization code for an access token that can be used to invoke the APIs. To do this your app will need to perform an HTTP POST to the following URL with a standard set of OAuth parameters. This endpoint will only accept a message body encoded with the application/x-www-form-urlencoded content type.


The required parameters are:

grant_typeThis should be set to "authorization_code"
client_idIssued when creating your integration
client_secretRemember this guy? You kept it safe somewhere when creating your integration
codeThe authorization code from the previous step
redirect_uriMust match the one used in the previous step

The Webex REST API will then respond with JSON containing an access token and a refresh token, as shown in the example below:

 "expires_in":1209600, //seconds
 "refresh_token_expires_in":7776000 //seconds

After the access token expires, using it to make a request from the API will result in an HTTP 401 "Invalid Token Error" response, such as:

    "message": "The request requires a valid access token set in the Authorization request header.",
    "errors": [
            "description": "The request requires a valid access token set in the Authorization request header."
    "trackingId": "API_12345678-90AB-CDEF-1234-567890ABCDEF"

At this point, you should use the refresh token to generate a new access token from the authorization server.

Using the Refresh Token

Using access tokens that are short-lived and requiring that they periodically be refreshed helps to keep data secure. If the access token is ever compromised, the attacker will have a limited time in which to use it. If a refresh token is compromised, it is useless to the attacker because the client ID and secret are also required to obtain a new access token.

To refresh the access token, issue a POST to https://webexapis.com/v1/access_token with the following fields:

grant_typeThis should be set to "refresh_token"
client_idIssued when creating your integration
client_secretRemember this guy? You kept it safe somewhere when creating your integration
refresh_tokenThe refresh token you received from the previous step

The Webex REST API will then respond with JSON containing a new access token. Generating a new access token automatically renews the lifetime of your refresh token.

Refreshing an access token before its expiration date will not cause the original access token to expire.

After the refresh token expires, using it to request a new access token from the API will result in an HTTP 400 "Invalid Request" response, such as:

    "message": "The refresh token provided is expired, revoked, malformed, or invalid.",
    "errors": [
            "description": "The refresh token provided is expired, revoked, malformed, or invalid."
    "trackingId": "API_12345678-90AB-CDEF-1234-567890ABCDEF"
anchorInvoking the Webex REST API

Authenticating with another user's access token works just like your developer token; supply the token in an Authorization header like so:

GET /rooms
Authorization: Bearer THE_ACCESS_TOKEN
Accept: application/json

or in cURL it would be

curl https://webexapis.com/v1/rooms \
-H "Authorization: Bearer THE_ACCESS_TOKEN" \
-H "Accept: application/json"

The Bearer part is important as it instructs the API that this is an OAuth token instead of HTTP Basic Auth.

With the API, you can perform actions as the user such as sending a message with an interactive card to someone. To respond to events, you'll need to configure webhooks. Webhooks will let your app know when an activity has occurred so you can take action. Check out the Webhooks Guide for more information about configuring webhooks.

With cards, you can give your users even more ways to interact with your integration or service, right in the Webex Teams clients. See the Buttons and Cards Guide for more information.