Show list of Slack users and quickly jump to DM thread
Some commands may require some configuration, which you might not want to add to your command source code. For example, you might need an API key.
Slapdash provides an interface for your command to collect configuration data, which is then sent alongside each command run.
The first time you run the command, it asks for the Slack Bot authentication token, then shows the list of users in Slack. If a user is selected, the Slack desktop is opened directly to the DM thread of the selected user.
The command asks to provide the Slack Bot Token.
This is an example of a Cloud Command, a command that runs on a server.
With a Cloud Command, you can share its URL with anyone, and each person will be able to use the command with their own authentication tokens.
See Cloud Commands for details on how to create and deploy cloud commands.
# -*- coding: utf-8 -*-
from flask import Flask, jsonify, request
from requests import get
To obtain the token,\n
- Create a Slack App at [Slack Apps page](https://api.slack.com/apps) (from scratch);
- Click **Bots**, then **Review Scopes to Add**;
- Add **users:read** Bot Token scope and then click **Install to Workspace** above;