GithubHelp home page GithubHelp logo

matthaldeman95 / slack-channel-bulk-inviter Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 10 KB

A small CLI app written in Python to invite a group of users into a channel using their email addresses.

Python 100.00%

slack-channel-bulk-inviter's Introduction

Slack channel bulk inviter

A small CLI app written in Python to invite a group of users into a channel using their email addresses.

Setup

Install Python 3 and pip. Clone the reop and cd to it, then install dependencies:

    pip install -r requirements.txt

You will need to create a Slack app at api.slack.com with the following OAuth scopes:

  • channels:read and channels:write (For public channels)
  • groups:read and groups:write (For private channels)
  • users:read.email (Always needed)

And specify "http://localhost" as your OAuth redirect URI.

Once you have your client ID and secret, paste them into the "credentials_empty.json" and rename it to "credentials.json". Leave the access token value blank, as that will be filled in once you receive an access token.

Disclaimer This is an extremely insecure way of storing your tokens!!! Your tokens are stored in plain text in a file. I take no responsibility for your leaked tokens. I highly suggest you modify the load_credentials() and write_credentials() methods in the SlackOAuthClient class to store the credentials in a safer way.

Then just run python main.py. It will open a browser window to navigate you through the OAuth flow; after you authorize your app and are redirected to the localhost redirect URI, your full URL should include a code= param. Copy the entire URL and paste it back into the prompt to have the code parsed out, and the rest of the OAuth flow completed.

After OAuth completes, the main routine will run.

Usage

Run python main.py to start, then follow the prompts to specify the channel type, channel name, and the list of users you want to invite (either in the form of a file or a comma separated string of emails)

slack-channel-bulk-inviter's People

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.