Integration with Slack

If you are using the Slack messaging app, integrate it with Chat. Integrating Slack with Chat enables you to chat with Xsolla representatives within Slack. You don’t need to create additional guest accounts or use third-party solutions.

The scheme below illustrates the process of exchanging messages between Chat and Slack:

To set up Slack integration with Chat:

  1. Log in to Slack.
  2. Create an app in Slack.
  3. Set up app’s permission scopes.
  4. Add the app to the Slack channel.
  5. Subscribe to events.

Create app in Slack

  1. Open the app creation page.
  2. Choose to build an app from scratch.

  1. Fill out the form fields:
    1. In the App Name field, enter the name of your app. For example, Chat Xsolla.
    2. In the Pick a workspace to develop your app in field, enter the workplace to which you want to add the app.
  2. Click Create App.

Set up app’s permission scopes

  1. On the page of your app, go to Features > OAuth & Permissions. If you are on another page, go to your apps and select from the list the application created in the previous step. Then, go to Features > OAuth & Permissions.

  1. In the Scopes block, click Add an OAuth Scope and add the following permission scopes:
    • channels:history — to view the message history in the public channel with the added app.
    • chat:write — to send messages in the name of the app.
    • chat:write.customize — to send messages in the name of the app with the ability to customize username and avatar. This permission scope allows you to identify the Xsolla representative you’re chatting with.
    • files:read — to view files shared in channels and direct messages with the added app.
    • groups:history — to view the message history in the private channel with the added app.
    • im:history — to view the message history in direct messages with the added app.
    • users:read — to view users’ info. This permission scope allows Xsolla representatives to identify the user they’re chatting with. If this permission scope is not added, messages will be anonymous.

  1. To add the app to your workspace, go to OAuth & Permissions > OAuth Tokens & Redirect URLs and click Install to Workspace.

  1. Click Allow to confirm adding permission scopes.

Add the app to the Slack channel

  1. Open your Slack workspace and select the channels that you want to add the app. If needed, create new private or public channels by selecting +Add channels.
  2. To add the app to a channel, go to the Show channel details section.

  1. Go to More > Add apps.

  1. Select the app from the list and click Add.

Subscribe to events

To send your messages to Chat, set up event subscriptions for your app:

  1. Send the following info to your Account Manager:
    • Signing secret.
    • Token.
    • Links to the channels or channel IDs to which you added your app. This is necessary in order to connect channels from Chat to channels in Slack. To get a link, open the context menu of the channel and select Copy link.

Note
If your project doesn’t have an Account Manager, you can send this info through the Chat widget in the lower corner of the screen in the Xsolla Publisher Account or on the documentation website.

  1. Get a URL for receiving events from your Account Manager.
  2. Go to Your Apps page and open the app you created.

  1. On the setting page of your app go to Event Subscriptions > Enable Events, set the Enable Events toggle to On, and paste the received URL to the Request URL field.
  2. Make sure the field is marked as Verified. If there is no “Verified” mark, check if the URL is correct or contact your Account Manager.
  3. Go to Event Subscriptions > Subscribe to bot events, click Add Bot User Event and subscribe to the following events:
    • message.im — a new message is sent to the app’s direct messages.
    • message.groups — a new message is sent to the private channel.
    • message.channels — a new message is sent to the public channel.
    • file_shared — a user shared a file in the app’s direct messages or channels with the added app.

  1. Click Save Changes.

Get signing secret

This secret is used to validate requests from applications. To get it, on the app settings page, go to Basic information > App Credentials. Go to the Signing Secret field, click Show, and copy the field value.

Get token

This token is used to send messages from Chat to Slack. To get a token:

  1. On the app settings page, go to Features > OAuth & Permissions.
  2. Copy the authentication token from the Bot User OAuth Token field.

Was this article helpful?
Thank you!
Is there anything we can improve? Message
We’re sorry to hear that
Please explain why this article wasn’t helpful to you. Message
Thank you for your feedback!
We’ll review your message and use it to help us improve your experience.
Rate this page
Rate this page
Is there anything we can improve?

Don’t want to answer

Thank you for your feedback!
Last updated: August 6, 2021

Found a typo or other text error? Select the text and press Ctrl+Enter.

Report a problem
We always review our content. Your feedback helps us improve it.
Provide an email so we can follow up
Thank you for your feedback!