for u in $(jq --raw-output ". | .[]" < members.json); do | |
clear; | |
echo Inviting user ${u}; | |
curl -i -X GET "https://slack.com/api/channels.invite?token=${API_TOKEN}&channel=${CHANNEL}&user=${u}" | head -n 20; | |
sleep 1; | |
done; |
Since legacy tokens are no longer endorsed by Slack themselves, does anyone have a better / more recent solution for this?
A developer on your team might want this type of token for testing an app or integration, but you should be cautious about who you grant these to. Instead of using legacy tokens, we encourage creating internal integrations which have more controlled access to data.
I don't want build an app just to do one-off bulk invitation
Deprecated!
The best practice is now described in the Web Applications StackExchange: How do I invite all team members to a new Slack channel?
Since legacy tokens are no longer endorsed by Slack themselves, does anyone have a better / more recent solution for this?
If you are looking for a no-code solution, you can use Channel Tools app to invite all users to a Slack channel (and more).
Disclaimer: I'm the maker of the app.
Nice. For those looking for a browser based solution, I tested this Chrome Extension and it worked: https://chrome.google.com/webstore/detail/slack-invite-all/okakcmghmbmdgbccjfclfkeednhhlpeg