Documentation Index

Fetch the complete documentation index at: https://docs.algosolutions.com/llms.txt

Use this file to discover all available pages before exploring further.

Example: OAuth Configuration for Cisco Webex

Prev Next

This guide explains how to:

  • Integrate an Algo device with Cisco Webex using OAuth

  • Verify the configuration by sending a test message to a Webex space

  • Use the OAuth profile to send a test message to a Webex space from an Algo 8450

Note

This document includes third-party configuration procedures that are subject to change. It is provided for reference purposes only, and Algo cannot guarantee that the screenshots or procedures will always be current or up to date.

Before you start

Ensure you have the following:

  • A Webex account

  • A Webex space where messages will be posted

Procedure Overview

This procedure includes the following steps:

  1. Creating a Webex Integration

  2. Creating an OAuth Authorization Profile

  3. Finding Your Space ID

  4. Testing "HELLO" Message to a Webex Space

  5. (Optional): Configuring an 8450 Button to Send Message to a Webex Space


Creating a Webex Integration

Create a Webex integration and obtain the required credentials for OAuth. Webex integrations act as OAuth clients that generate credentials, define scopes, and a redirect URI for authentication.

To create a Webex Integration:

  1. Sign in to the Webex for Developers.

  2. Select Start Building Apps.

  3. Select Create an Integration.

  4. Configure the integration details:

    • Will this integration use a mobile SDK?: Select No.

    • Integration name: Enter a name for your application. For example, Algo Device Notifier.

    • Icon: Choose or upload an icon for your integration.

    • App Hub Description: Enter a description.

    • Redirect URI(s): Enter your Algo device’s callback URL using this format: https://<ALGO_DEVICE_IP>/control/oauth-callback.lua

      Note

      • The redirect URI must use HTTPS.

      • The redirect URI must match exactly in both Webex and your Algo device's configuration.

    • Scopes: Select spark:all.

  5. Select Add Integration.

  6. After registration, copy these values from the application’s Overview page:

    • Client ID

    • Client Secret

      You need this information to configure OAuth later.

Creating an OAuth Authorization Profile

Create an OAuth profile to store your Webex authentication settings.

Ensure you have the following:

  • Client ID

  • Client Secret

To create Webex OAuth Profile:

  1. Log in to your device’s web interface using HTTPS.

    HTTPS is required by Webex OAuth process.

  2. Go to the Advanced SettingsOAuth.

  3. Set a Name for your OAuth profile.

  4. Select WEBEX as the Provider Type.

  5. Accept the following automatically populated values:

  6. Configure the following:

    • Client ID: Enter your integration’s Client ID.

    • Client Secret: Enter your integration’s Client Secret.

    • PKCE Redirect URI: Set to https://<ALGO_DEVICE_IP>/control/oauth-callback.lua

      Note

      You must use HTTPS in the URI.

      Replace <ALGO_DEVICE_IP> with your device IP.

  7. Leave the following fields blank. These values are automatically populated during authorization.

    • PKCE Authorization Code

    • PKCE Code Verifier

    • PKCE Refresh Token

      Note

      Refresh tokens can expire or become invalid for several reasons, such as revoked app access, password changes, unused tokens, or admin policy restrictions. Refer to the OAuth provider’s documentation for more information. If a refresh token expires or becomes invalid, your automation stops working until OAuth access is reauthorized.

  8. Select START AUTHORIZATION.

  9. Sign in to your Webex account.

  10. When prompted, select Accept.

  11. Select Create Profile.

    Your profile appears under the OAuth Profiles list.

Finding Your Space ID

You must specify a space ID to send messages.

To find your space ID:

  1. Go to List Rooms | Webex for Developers.

  2. Select Run.

  3. Sign in to your Webex account if prompted.

  4. In the response, locate your space title under items.

  5. Find the field labeled id corresponding to your space name.

  6. Copy the value of id.

    This is your space ID. You need it in your API request payload.

Testing "HELLO" Message to a Webex Space

You can test sending messages to the Webex space.

Ensure you have the following:

  • Space ID

To test sending messages to a Webex Space:

  1. Log in to your device’s web interface using HTTPS.

    HTTPS is required by Webex OAuth process.

  2. Go to the Advanced SettingsOAuth.

  3. Select your WEBEX profile from the Test OAuth Profile dropdown list.

  4. Select WEBEX as the Provider Type Template.

  5. In the Data Payload, enter your space ID.

    {
      "roomId": "<space_id>",
      "text": "HELLO!"
    }
  6. Select RUN OAuth Test.

    Upon success:

    • The message is posted to the Webex space.


      A successful response is displayed.

Configuring an 8450 Button to Send Message to a Webex Space

You can configure a button on the Algo 8450 to send messages to a Webex space using an existing OAuth profile.

To configure a 8450 button to send messages to a Webex space:

  1. Create a button on a 8450 screen.

  2. Set the Button Status to Enabled.

  3. Configure the following:

    • Text: Enter the button display text.

    • Action: Set to Send API Request.

    • Number of API Requests: Set to 1.

    • Request 1 - Command: Set to Other.

    • Request 1 - Method: Set to POST.

    • Request 1 - Custom Path: Set to v1/messages.

    • Request 1 - Targets: Set to webexapis.com.

    • Request 1 - OAuth Profile: Select your Webex profile.

    • Request 1 - Headers: Set to Custom Headers.

    • Request 1 - Custom Headers: Set to Content-Type: application/json; charset=utf-8.

    • Request 1 - Data Payload: You can use the default payload.

      {
        "roomId": "<room_id>",
        "text": "HELLO!"
      }
  4. Select Save.

    Press the button and verify that the message is posted to the Webex channel.

Troubleshooting

I got a 502 error when I run the OAuth Test

You may be logged out of your Algo device’s web interface. Log in again and retry.

After I run the “Start Authorization” again, my OAuth Test fails

Each time you run Start Authorization again, select Update Profile to save the new credentials before running the test.

My OAuth profile stops working.

An OAuth profile can stop working if the OAuth provider rejects or invalidates the access or refresh token. Refer to the OAuth provider’s documentation for more information. If this occurs, the OAuth profile must be reauthorized.