Skip to content

Instantly share code, notes, and snippets.

View okrg's full-sized avatar
🏠
Working from home

Rolo okrg

🏠
Working from home
View GitHub Profile
@okrg
okrg / invite_to_slack.js
Last active May 25, 2018 00:06 — forked from dommmel/invite_to_slack.js
Zapier Code to auto invite users to slack
var slackTeam = "YOUR_SLACK_TEAM_NAME ";
var token = 'YOUR_ADMIN_TEST_TOKEN';
// A test token will suffice.
// You can generate one at https://api.slack.com/docs/oauth-test-tokens
// Just make sure that the user issuing the test token is an admin.
var url = 'https://'+ slackTeam + '.slack.com/api/users.admin.invite';
fetch(url, {
method: 'POST',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},