This guide explains how to:
Integrate an Algo device with Slack using OAuth
Verify the configuration by sending a message to a Slack channel
Use the OAuth profile to send a message to a Slack channel 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 Slack account
A Slack channel where messages will be posted
Procedure Overview
This procedure includes the following steps:
Creating a Slack Application
Create a Slack application and obtain the required credentials for OAuth.
To create a Slack Application:
Go to https://slack.com/signin#/signin and sign in to your Slack account.
Go to: https://api.slack.com/apps.
Select Create New App.
 (1).png)
Select From scratch.
 (1).png)
Enter the following, then select Create App.
App Name: Enter a name for your application. For example, Algo Device Notifier.
Workspace: Select a workspace to develop your application in.
 (1).png)
Under App Credentials, copy the following information:
Client ID
Client Secret
Note
Keep your Client Secret secure. Do not share it.
 (1).png)
You need this information to configure OAuth later.
Go to Features → OAuth & Permissions.
Under Bot Token Scopes, select Add An OAuth Scope and type to add the following permissions:
chat:write(required) – Send messageschat:write.public(optional) – Send messages to channels without joining.channels:read(optional) – View public channels.groups:read(optional) – View private channels the bot is in.png)
Under OAuth & Permissions, select Add New Redirect URL.
 (1).png)
Enter your Algo device’s callback URL using this format: https://<ALGO_DEVICE_IP>/control/oauth-callback.lua and select Add.
 (1).png)
Note
The redirect URI must match exactly in both Webex and your Algo device's configuration.
Select Save URLs.
Select Install to Workspace.
 (1).png)
Select Allow so the application can access Slack.
 (1).png)
After installation, Slack generates a Bot User OAuth Token:
.png)
Select Opt In for Advanced token security via token rotation.
Recommended for developers building on or for security-minded organizations – opting into token rotation allows app tokens to automatically expire after they’re issued within your app code.
.png)
When asked, select Opt In again to confirm it.
.png)
Once Token rotation is enabled, you can see the following info
.png)
Creating an OAuth Authorization Profile
Create an OAuth profile to store your Slack authentication settings.
.png)
To create a Slack OAuth profile:
Log in to your device’s web interface using HTTPS.
HTTPS is required by Slack OAuth process.
Go to the Advanced Settings → OAuth.
Set a Name for your OAuth profile. For example, Slack.
Select SLACK as the Provider Type.
Accept the following automatically populated values:
Grant Type: AUTH_CODE_PKCE
Token URL: https://slack.com/api/oauth.v2.access
Auth URL: https://slack.com/oauth/v2/authorize
Scope Mode: SCOPES_LIST
Scope: Set to
chat:write,channels:read,chat:write.public,groups:readPKCE Method: S256
Response Type: code
Client Auth Mode: CLIENT_SECRET_POST
Configure the following:
Client ID: Enter your Client ID.
Client Secret: Enter your Client Secret.
PKCE Redirect URI: Set to
https://<ALGO_DEVICE_IP>/control/oauth-callback.luaNote
You must use HTTPS in the URI.
Replace <ALGO_DEVICE_IP> with your device IP.
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.
PKCE Grant Type Override
Set Extra Params (JSON) as below:
{ "revocation_endpoint": "https://slack.com/api/auth.revoke" }Select START AUTHORIZATION
.png)
In the prompt, select Allow.
Select Create Profile.
Your profile appears under the OAuth Profiles list.
Finding Your Slack Channel ID
You must specify a channel ID to send messages.
To find your Slack Channel ID:
In Slack, right-click your channel name and select View channel details.
.png)
Copy your Channel ID.
Testing "HELLO" Message to Channel
You can test sending messages to the Slack channel.
.png)
To test sending messages to a Slack Channel:
Log in to your device’s web interface using HTTPS.
HTTPS is required by Slack OAuth process.
Go to the Advanced Settings → OAuth.
Select your Slack profile from the Test OAuth Profile dropdown list.
Select SLACK as the Provider Type Template.
In the Data Payload, enter your Channel ID.
{ "channel": "<CHANNEL_ID>", "text": "HELLO!" }Select RUN OAuth Test.
Upon success:
The message is posted to the Slack channel.
A successful response is displayed.
 (1).png)
Configuring an 8450 Button to Send Message to a SLACK Channel
You can configure a button on the Algo 8450 to send messages to a Slack channel using an existing OAuth profile.
.png)
To configure an 8450 button to send messages to a Slack Channel:
Create a button on an 8450 screen.
Set the Button Status to Enabled.
Configure the following:
Text: Set to SLACK Message.
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
api/chat.postMessageRequest 1 - Targets: Set to
slack.comRequest 1 - OAuth Profile: Select your Slack profile.
Request 1 - Headers: Set to Custom Headers.
Request 1 - Custom Headers: Set to
Content-Type: application/json; charset=utf-8Request 1 - Data Payload: Enter the Channel ID and desired text.
{ "channel": "<Channel_ID>", "text": "HELLO" }
Select Save.
Press the button and verify that the message is posted to the Slack channel.
Troubleshooting
I get 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
Why can’t I send messages to private channels?
Your user account must be invited to private channels first.
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.