Configure Slack Notifications

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:

  1. Log in to your Slack Workspace.
  2. Go to https://api.slack.com/.
  3. Click Create an app. You will need to log in if you haven’t already.
  4. Select From scratch.
  5. Enter a name for the app (for example, WHMCS).
  6. Choose the workspace you wish to add the app to and click Continue.
  7. Under Add features and functionality, select Permissions.
    Adding permissions for a Slack app.
  8. Scroll to Scopes: Bot Token Scopes.
    Adding scopes for a Slack app.
  9. Click Add an OAuth Scope and assign the following permissions:
    • channels:join
    • channels:read
    • chat:write
    • groups:read
  10. Click Install App to Workspace.
    Installing a Slack app.
  11. Confirm authorization for the permissions for the app that you just configured.
  12. Copy the Bot User OAuth Access Token value. You will need this to enter in WHMCS.
    Copying the bot access token.
  13. In WHMCS, to go Configuration () > System Settings > Notifications.
  14. Under the Slack notification provider, click Configure.
  15. Paste the Bot User OAuth Access Token that you copied into OAuth Access Token.
    Adding the token for a Slack app.
  16. 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.
  17. 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:

  1. Open the Slack app.
  2. Go to your private channel.
  3. Invite the app to the channel with the following command:
    /invite @app_name
    
    Replace app_name with the name of your app. For example:
    /invite @WHMCS Test App
    
  4. 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 11, 2024