Skip to content
Go to file


Failed to load latest commit information.
Latest commit message
Commit time


clj-slack is a Clojure library to talk to the Slack REST API. It supports almost the entire Slack API.

Build Status


Slack API methods are described here.

clj-slack documentation is available here.


This is on Clojars of course. Just add [org.julienxx/clj-slack "0.6.3"] to your :dependencies in your project.clj file.

Get your access token by creating a new app or here. If you create a new Slack app, don't forget to add the relevant scopes to your app.

Your need to create a connection map like {:api-url "" :token "YOUR TOKEN"} and pass it as the first argument of every functions in clj-slack. Of course you can change api-url for debugging or testing purposes.

You can pass clj-http options in the connection map if needed.

clj-slack will throw an Exception if the connection map you're trying to use is not valid.


(require 'clj-slack.users)
(def connection {:api-url "" :token "YOUR TOKEN"})
(clj-slack.users/list connection)

You can use optional params described in Slack API by passing them through a map.

(require 'clj-slack.stars)
(def connection {:api-url "" :token "YOUR TOKEN"})
(clj-slack.stars/list connection {:count "2" :page "3"})

Uploading a file:

(require 'clj-slack.files)
(def connection {:api-url "" :token "YOUR TOKEN"})
(clj-slack.files/upload connection ( "/path/to/file/file.ext") {:channels "CHANNEL_ID", :title "This is a file.})


In order to run the tests, you have to set 3 environment variables:

  • TOKEN a legacy Slack token
  • CLIENT_ID a OAuth client id
  • CLIENT_SECRET a OAuth client secret then run lein test.


Copyright (C) 2014-2019 Julien Blanchard

Distributed under the Eclipse Public License, the same as Clojure.

You can’t perform that action at this time.