CGI script to send an invitation to a user for a Slack channel
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 3 commits ahead of ThePerlShop:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
t
.gitignore
LICENSE
README.md
app.pl
cpanfile

README.md

Slack Invite

A Mojolicious script to send someone an invitation to a Slack channel. It is a response to the application described in http://blog.theperlshop.com/2018/09/12/sending-a-slack-invite-with-a-perl-cgi-script/. Mojolicious apps can run as-is under CGI environments.

This uses the undocumented users.admin.invite API call.

Configuration can be placed in app.conf to override defaults

{
    # A legacy token: https://api.slack.com/custom-integrations/legacy-tokens
    slack_api_token => 'xxxx-xxxxxxxxx-xxxx',

    # Which channels you'd like to send an invitation to, comma-separated.
    slack_channels => '',

    # URL to call to invite users
    slack_api_url => 'https://slack.com/api/users.admin.invite',
}