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.

Integration with Slack

  1. Open your Slack workspace.
  2. Mark the channel you want to add to the app. You can also create new private or public channels.
  3. Open the channel’s context menu and choose Open channel details.

  1. Go to tab Integrations and click Add an App.

  1. Choose the Chat Xsolla 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 required to connect channels from Chat to channels in Slack. You can find the link in the context menu of the channel: go to chapter Settings > Slack Connect and choose Share link.

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:
    • — 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.

Control bots

Add bot to the new channel to connect with Chat Xsolla

  1. In the dialog window of your channel, enter @chat-xsolla to find the bot and choose it from the list.

  1. In the opened window, click Invite to Channel.

  1. Copy the channel link or ID and send it to your Account Manager to connect with chat. You can find the link in the channel context menu: go to chapter Settings > Slack Connect and chooseShare link.

Delete the bot

  1. Open the bot list. The list of bots you added in your Slack workspace will appear on the Configuration tab.

  1. Click on the pencil icon and go to Edit configuration. In the opened page, click Remove.

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: December 30, 2022

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!