Configure Slack Notifications
On this page
Configuring notifications with Slack® allows you to receive notifications in your Slack channels when events occur within WHMCS.
Configuring Slack Notifications
To enable WHMCS to communicate with the Slack API, WHMCS requires an OAuth Access Token.
To configure notifications through Slack:
- Log in to your Slack Workspace.
- Go to https://api.slack.com/.
- Click Create an app. You will need to log in if you haven’t already.
- Select From scratch.
- Enter a name for the app (for example,
WHMCS
). - Choose the workspace you wish to add the app to and click Continue.
- Under Add features and functionality, select Permissions.
- Scroll to Scopes: Bot Token Scopes.
- Click Add an OAuth Scope and assign the following permissions:
- channels:join
- channels:read
- chat:write
- groups:read
- Click Install App to Workspace.
- Confirm authorization for the permissions for the app that you just configured.
- Copy the Bot User OAuth Access Token value. You will need this to enter in WHMCS.
- In WHMCS, to go Configuration () > System Settings > Notifications.
- Under the Slack notification provider, click Configure.
- Paste the Bot User OAuth Access Token that you copied into OAuth Access Token.
- Click Save Changes. WHMCS will attempt to verify the access token.
- If verification fails you will receive an error message. Check whether you entered the access token correctly, verify that it has all the required scopes, and try again.
- If verification succeeds, the window will close.
- Create the desired notification rules. WHMCS will automatically join your Slack channel when you define it in a notification rule.For more information, see Notifications.
Private Channels
To send notifications in private channels:
- Open the Slack app.
- Go to your private channel.
- Invite the app to the channel with the following command:
Replace/invite @app_name
app_name
with the name of your app. For example:/invite @WHMCS Test App
- Send the message.
The app will join the private channel and become available for selection in WHMCS when creating a notification rule.
Last modified: October 31, 2024