Created
July 20, 2015 17:33
-
-
Save treeder/badf15f4343a1c81f45d to your computer and use it in GitHub Desktop.
Simple script to list all your slack channels. Good way to get the id.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rest-client' | |
r = RestClient.post "https://yourskinbox.slack.com/api/channels.list", | |
{ | |
:token => 'API_TOKEN' | |
} | |
r = JSON.parse(r) | |
r['channels'].each do |c| | |
puts "#{c['name']} - id: #{c['id']}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment