ValoRoster Slack Bot

Number of APIs: 6

For an introduction to and demonstration of ValoRoster, please go to the [workspace overview]

Get Started with ValoRoster

Step 1: Fork this collection

To use ValoRoster, click the Fork button near the top of the page and fork the ValoRoster Slack Bot collection into your own workspace. The following steps are to be completed in your fork of the collection.

Step 2: Create a Qodex webhook

[Qodex webhooks] allow an entire collection to run when an event occurs. To create the Qodex webhook that will run the ValoRoster Slack Bot collection in the current workspace, enter the following information in the Initial Value fields under the Variables tab of the ValoRoster Slack Bot collection.

Collection Variable NameCollection Variable Initial Value
Qodex_api_keyfrom the Qodex account settings
workspace_idthe ID of the workspace this collection is in; you can find this in this page's URL or using the [Qodex API workspaces endpoint] Screen-Shot-2021-07-26-at-5-29-42-PM.png
collection_uidthe ID of the ValoRoster Slack Bot collection; you can find this by selecting ValoRoster Slack Bot collection from the Collections menu on the left, then clicking the on the right side of the screen. The collection_uid is listed under ID

Once you've entered and saved those variable values, click on the Create Webhook folder and then on the request named Create Qodex Webhook. Hit Send to create the webhook, then copy the value of the webhookUrl field from the repsonse body. Navigate back to the Variables tab of the ValoRoster Slack Bot collection, and paste the value into the Qodex_webhook_url variable's Initial Value field.

Step 3: Get a PandaScore access token

ValoRoster gets player and roster information through requests to the PandaScore API. To get a PandaScore access token, first create a PandaScore account. Next, go to your account dashboard and copy the access token. Paste that value in the pandascore_token variable's Initial Value field under the Variables tab of the ValoRoster Slack Bot collection.

Step 4: Create a Slack app for ValoRoster

To integrate ValoRoster into your Slack workspace, create a Slack app from scratch with an Incoming Webhook and two Slash Commands. - Follow this tutorial until the Using our new Slack bot section to create a Slack app and set up an Incoming Webhook. Copy the resulting incoming webhook URL and paste it in the slack_incoming_webhook_url variable's Initial Value field under the Variables tab of the ValoRoster Slack Bot collection. - This section of Slack's documentation explains how to create Slash Commands. From your Slack app's home page, click the Slash Commands tab on the left. Create two slash commands named /player and /roster, and set the Request URL for both commands to the Qodex Webhook URL you created earlier (stored in the collection variable Qodex_webhook_url). Set the remaining fields as you please, or refer to the examples below:

  • Click the OAuth & Permissions tab on the left, navigate to Scopes, and give your Slack app the Bot Token Scope channels:history if it doesn't already have it
  • Click the Install App tab on the left, then click the Reinstall to Workspace button and follow the instructions. This is necessary because the Slack app's permissions were updated

Using ValoRoster

Now that ValoRoster is set up, you can use it from the Slack channel you installed it into at the end of Step 4. The two commands are:

  • /player <playerName>, where <playerName> is the name of a professional Valorant player you want information about
  • /roster <teamName>, where <teamName> is the name of a professional Valorant team you want the roster for

To see a user demo, refer to the ValoRoster Demo section of the ValoRoster Slack Bot [workspace overview]

Note that ValoRoster's response time can be slow because Qodex webhooks, which are [Qodex monitors] under the hood, do not run instantaneously.

  1. Get Roster - Get Roster GET https://api.pandascore.co/valorant/teams?token={{pandascore_token}}&amp;filter[name]={{team_param}}

  2. Get Player - Get Player GET https://api.pandascore.co/valorant/players?token={{pandascore_token}}&amp;filter[name]={{name_param}}

  3. Get Player - Send Player Error Message POST {{slack_incoming_webhook_url}}

  4. Get Roster - Send Roster Error Message POST {{slack_incoming_webhook_url}}

  5. Qodex Webhook - Webhook that runs this collection GET {{postman_webhook_url}}

  6. Create Webhook - Create Qodex Webhook POST https://api.getpostman.com/webhooks?workspace={{workspace_id}}