Slack Developer Kit for Node.js
Go to GitHub



Oct 3, 2018

New Features

  • The IncomingWebhook constructor now has an agent option. It works exactly like the agent option from WebClient. It’s very useful for setting a proxy for requests using packages like https-proxy-agent or tunnel. Thanks @romanbalayan (#640)

Documentation improvements

  • Fixes the TypeScript lib configuration instructions for versions 3.1 and above. Thanks @melisdogan (#650).


Oct 1, 2018

New Features

  • You can now specify HTTP headers you’d like to include on all requests from WebClient. Just pass a headers option to the constructor. Thanks @ethan0920 (#629).

Bug fixes

  • Fixes a bug when specifying the agent option on WebClient using an agent from https-proxy-agent. Thanks @aoberoi (#645).

Documentation improvements

  • Fixes pagination sample code. Thanks @smaeda-ks (#641).

  • Adds missing WebClient instance in the Getting Started guide. Thanks @jharrilim (#637).

  • Adds documentation for using the package within a TypeScript project - see Thanks @aoberoi (#644).

  • Clarifies usage of Web API methods with no required options using callbacks. Thanks @aoberoi (#631).


Aug 30, 2018

New Features

  • Adds support for short lived tokens and automatic token refresh (#617) - thanks @aoberoi and @shanedewael


Aug 24, 2018

New Features

  • RTMClient.start() now returns a Promise that resolves with the data emitted with the authenticated event - thanks @clavin (#611)
  • Adds the state property to the type definition of Dialog - thanks @DominikPalo (#619)

Bug Fixes

  • Fixes an issue where RTMClient did not emit the "disconnected" event when it fails to connect - thanks @clavin (#610)


Aug 10, 2018

New Features

  • Workspace apps can now call methods on behalf of users for methods which require the X-Slack-User header. When calling one of these methods, specify the user ID in the new on_behalf_of option. - thanks @aoberoi (#609)
  • The new rejectRateLimitedCalls option in the WebClient constructor allows you to customize how you’d like to handle rate limiting. If you set it to true, the WebClient will not attempt to retry an API call for you, and will instead return an error with a code property set to the value ErrorCode.RateLimitedError. - thanks @aoberoi (#599)
  • Automatic pagination for cursor-based pagination enabled methods: It’s always recommended to perform pagination using the cursor and limit options directly, but if you don’t pass either when calling a method, the WebClient will automatically iterate through all the pages and returned a merged result. - thanks @aoberoi (#596)
  • The WebClient will warn when calling deprecated methods (files.comments.add and files.comments.edit) - thanks @aoberoi (#604)

Bug fixes and more

  • Fixes the crash when RTMClient#disconnect() was called from the connecting state - thanks @aoberoi (#603)
  • Fixes an issue where uploading a file without a token fails in WebClient with an unrelated error - thanks @aoberoi (#587)
  • Resolves an issue where your app requires a newer version of @types/node than this package specifies - thanks @aoberoi (#605)
  • Fixes the Dialog.selected_options type definition - thanks @harveyr (#588)
  • Adds information, fixes syntax issues, and corrects typos in the documentation - thanks @chris-peterson, @jd0920 (#584, #600, #601)
  • Tests against node v10 in Travis - thanks @aoberoi (#606)


Jun 6, 2018

  • Fixes an issue where RTMClient would crash after its connection was interrupted because upon reconnection the connection monitoring code would improperly handle new messages as pongs. (#578) - thanks @aoberoi.


Jun 5, 2018

  • Adds new permissions method named aliases to WebClient: apps.permissions.resources.list and apps.permissions.scopes.list (#568) - thanks @ggruiz
  • Fixes an issue where an RTMClient instance throws errors while trying to reconnect after a connection interuption (#560) - thanks @aoberoi
  • Fixes issue where rate-limit handling in WebClient was not triggering, and adds tests (#570, #573) - thanks @ggruiz
  • Adds missing IncomingWebhookResult type to exports (#562) - thanks @mledom
  • Changes options argument of RTMClient#start() to be optional as it was intended (#567) - thanks @christophehurpeau


May 11, 2018

  • Uses the "files" key in package.json to implement a whitelist of files that are packed for npm publish.


May 11, 2018

  • Adds the notify_on_cancel field to the Dialog type definition (#541) - thanks @DominikPalo
  • Adds AttachmentAction type definition to express the type of the action property of MessageAttachment. (#543, #551) - thanks @brianeletype, @DominikPalo
  • Adds the SelectOption type defintion and related properties to the Dialog type definition. (#549) - thanks @DominikPalo
  • Fixes the missing scopes property in WebClient responses. (#554) - thanks @aoberoi
  • Fixes an issue in RTMClient where websocket errors in the connecting:authenticated state would cause the program to crash. (#555) thanks @aoberoi
  • Fixes an issue where KeepAlive would monitor the RTM connection while the websocket was not ready after a reconnection. (#555) thanks @aoberoi


Apr 25, 2018

  • Allows mrkdwn_in and callback_id fields in message attachments for formatting on attachment fields (#528) - thanks @DominikPalo
  • Fixes optionality of validate argument for channels.join method (#530) - thanks @DominikPalo
  • Adds the users.conversations method (#532) - thanks @DominikPalo
  • Fixes overwriting of default parameters after send() call (#535) - thanks @franckbrignoli
  • Fixes and adds logging for unexpected websocket close in StateMachine (#537) - thanks @shanedewael


Mar 23, 2018

  • IncomingWebhook.send() works with both callbacks and Promises (#508) - thanks @clavin
  • Completes type defintions for all WebClient method arguments (#512) - thanks @clavin
  • Allows files.upload to work with Buffers (in addition to ReadableStreams) (#500) - thanks @KharitonOff
  • Allows any WebClient methods argument to work with binary types (#519) - thanks @clavin and @aoberoi
  • Fails when WebClient.apiCall() options don’t look like the right type (#522) - thanks @aoberoi
  • Fixes TypeScript compile errors in node >=6 <=8 related to callbackify (#518) - thanks @aoberoi
  • Fixes mismatched parenthesis in RTMClient usage example documentation (#511) - thanks @parthsr
  • Adds examples directory back to the repository (#520) - thanks @aoberoi


Mar 14, 2018

  • Fixes crash in projects where "name" or "version" were not defined in the package.json file (#478) - thanks @wilhelmklopp @clavin @aoberoi
  • Fixes IncomingWebhook.send() to parse the response as text instead of JSON (#477) - thanks @aoberoi
  • Allows IncomingWebhook to be initialized without defaults (#479) - thanks @aoberoi
  • Allows WebClient to be initialized without a token in TypeScript (#482) - thanks @aoberoi
  • Allows unspecificed arguments to be used with WebClient method aliases and apiCall() (#484) - thanks @clavin
  • Exports method argument types as top level exports in the type declarations (#483) - thanks @aoberoi
  • Fixes inaccurate property type for as_user in ChatPostMessageArguments (#475) - thanks @harveyr
  • Improves the OAuthAccessArguments and OAuthTokenArguments types (#481) - thanks @aoberoi


Mar 8, 2018

  • WebClient
  • New apiCall(method, options) public API for making generic Web API calls.
  • Improved logging
  • Improved error management
  • Configuration for custom http Agent
  • Custom TLS configuration
  • Tons of performance improvements

  • RTMClient
  • Improved message queuing - No need to wait for client to connect before sending a message.
  • Lifecycle events driven by an all-new state machine
  • New keep-alive algorithm
  • Improved logging
  • Improved error management
  • Configuration for custom http Agent
  • Custom TLS configuration
  • Tons of performance improvements

  • TypeScript declarations available for all APIs :tada:

  • Updates all dependencies to their latest version
  • Drops support for node versions less than 6.0

  • Breaking Changes If you are upgrading from a previous version, follow our comprehensive Migration Guide to learn how to transport your app into the new, shiny, future!


Dec 21, 2017

  • Adds several missing RTM events into RTM.EVENTS export (thanks @clavin) #457 #448
  • Adds users.lookupByEmail to WebClient (thanks @DominikPalo) #434
  • Fixes stale values kept across requests when using requestOptionsTransport (thanks @bertrandom) #450
  • Adds documentation for presence subscription over RTM (thanks @aoberoi) #454
  • Fixes typos in documentation (thanks @konklone, @marclemagne, @aoberoi) #444, #446, #461, #466


Dec 21, 2017

  • Deprecates data store APIs See the migration document for more details:
  • Major docs content rewrite (thanks @aoberoi) #428, #239, #305, #310, #364, #366, #413, #411, #423
  • Adds chat.getPermalink Web API method (thanks @DominikPalo) #431
  • Adds opts.user argument to users.identity Web API method (thanks @bertrandom) #432
  • Fixes bug with not passing optional arguments for (thanks @aoberoi) #441
  • Fixes dead link to node-retry (thanks @pine) #433
  • Adds eaiser support for Buffer input in files.upload Web API method (thanks @aoeberoi) #307
  • Refactors logger usage across the package (thanks @aoberoi) #334
  • General JSDoc, require(), dead code, clean up


Sep 12, 2017

  • Adds a new transport that lets you define options on the request module (#425 thanks @bertrandom!)


Sep 12, 2017

  • Fixes an issue where newer versions of request were causing a linting error
  • Adds irrecoverable error types for the RTM client


Sep 12, 2017


Sep 12, 2017

  • Adds support for the conversations.* family of Web API methods. See - thanks @aoberoi
  • Adds locale awareness options to various Web API methods. - thanks @aoberoi
  • Fixes an argument encoding issue with calling users.profile.set (#360) - thanks @aoberoi


Aug 24, 2017

  • Adds MPIM data to the DataStore as Groups (#389) - thanks @aoberoi and @bradslavin


Aug 11, 2017

  • Added chat.postEphemeral Web API endpoint to the WebClient (#384) - thanks @shanedewael
  • Added linkNames option to IncomingWebhook (#342) - thanks @mozamimy
  • Ignored package-lock.json for use with npm 5 (#385) - thanks @aoberoi


May 25, 2017

  • RTM client can now be initialized to use rtm.connect instead of rtm.start with option useConnect: true (#344) - thanks @CharlieHess
  • Adds the new Web API method: rtm.connect (#344) - thanks @CharlieHess
  • Adds support for the chat.unfurl option userAuthRequired (#336) - thanks @againer
  • Adds the new Web API method: im.replies (#339) - thanks @moinism
  • Adds support for presence subscriptions (#350) - thanks @CharlieHess
  • Improve reliability of RTM reconnects (#349) - thanks @CharlieHess
  • Fixes issue with RTM reconnect not using the same options as the initial connect (#347) - thanks @CharlieHess
  • Fixes out of order messages in client’s request queue (#346) - thanks @chapmanc
  • Fixes bug in MemoryDataStore when seaching for a user by username that does not exist in the team (#332) - thanks @frejos
  • Fixes example code to work as described in the comments (#337) - thanks @lukeb-uk


Mar 15, 2017

  • Adds the new Web API method: chat.unfurl. Check out App Unfurls!


Dec 20, 2016

  • Well, that didn’t go so well, now did it? This release fixes #303


Dec 20, 2016

  • In the past, you had to contort your callbacks to any Web API endpoint, because not all errors were propogated through the error parameter. Well, good news: We are no longer forcing you to sit uncomfortably. Server errors that result in a 200 OK + {ok: false, error:"mumble_mumble"} result are now passed through the error parameter so you can simplify your callback logic. If you want.
  • Did you know that Slack will pass information on the scopes required to call a particular Web API endpoint? We do! And now you can get your hands on that very same information in your Web API callbacks too. Will help you debug and identify failed calls due to scoping issues.
  • The Web API functionality has been expanded to include users.profile.[get|set]. Mind that you can only update your own profile :wink:
  • Did you notice that there were errors in the documentation? There were (and almost certainly still are). Several concerned readers wrote in with comments and fixes, all of which have been addressed.
  • Last but not least, we have added functionality to track basic usage of this SDK. All calls to the Web API and the RTM API are made with a user agent string that identifies the version of this SDK in use, as well as system information on node version and operating system. More better, you can add to this treasure trove of analytics—we’ve added a function in helpers.js that you can call from your code to let us know more about your framework or bot. In the future, we will be adding this same information to a wide range of SDKs that access the Slack Platform, and releasing usage data publicly so we can all see who is winning this popularity contest.


Dec 5, 2016

  • Don’t know a user’s ID? Want to find a DM with that user anyway? Now you can retrieve a DM from the memory store by username. Awesome.
  • API endpoints of the form a.b.c required a bit of rather tortured code to call. We have removed the torture requirements, and you can now call them as you might expect.


Nov 10, 2016

  • You can now use arbitrary images for your bot’s avatar with incoming webhooks. Because your app wasn’t creepy enough before.
  • Previously, we had no support for HTTPS proxies. This unfortunate situation has been rectified, and now your bot can live behind the nastiest sorts of firewalls.


Sep 6, 2016

  • Adds support for Incoming Webhooks
  • Fixes a bug around User IDs


Jul 29, 2016

  • Fixes a bug whereby events with fields not recognized cause a crash. Wow.
  • Updated some logic around what user ids look like.


Jul 25, 2016

  • Fixes a bug in the package.json published by 3.5.2.


Jul 25, 2016

  • Updating the links in package.json so that you don’t need SSL credentials to pull down the github repo.


Jul 6, 2016

  • Updates lodash from ^3.10.1 to ^4.13.1. And means it.
  • Minor tweaks to existing documentation and example code to make them consistent with each other. Because hobgoblins are friendly and love you.


Jun 14, 2016


May 31, 2016


May 26, 2016

  • Doesn’t crash the RTM client if a message with a reply_to ID with no response handler is received


May 24, 2016

  • Creates a memory data store by default if an undefined, but not false or null value is passed for opts.dataStore
  • Aliases the retry policies to be human readable


May 24, 2016

  • Updates the RTM client to emit an UNABLE_TO_RTM_START event when all reconnection attempts are exhausted, rather than throwing an error
  • Suppresses some spurious log lines when tests are run


May 23, 2016

  • Updates the _makeAPICall method to make the optional API args param optional to pass in, so the third param to this function can be either an opts object or a cb. This is to allow us to add optional arguments to API methods without it being a breaking change.
  • Fixes the retry-after header name and adds a numeric fallback if the retry-after value can’t be parsed, thanks @foiseworth!
  • Adds new API methods to various facets
  • Adds optional arguments to:
    • files.comments.add: adds a channel param, for the channel id of the location to associate with the new comment
    • chat.delete: adds a boolean as_user param, to support deleting a message as the authed user


May 19, 2016

  • Removes the DM facet
  • Updates the aliasing approach for IM / DM to correctly alias DM to the IM Facet


May 1, 2016

  • Updates the lib/clients/web/facets/index.js to reference the new facets added in the 3.0.0 update, thanks @ekmartin
  • Adds in a reminders client facet
  • MemoryDataStore.getUserByEmail now looks at the correct part of the user object for the email, thanks @SimantovYousoufov
  • Adds docs and examples for the data store and sending DMs, thanks @PaulAsjes!


Apr 24, 2016


Mar 12, 2016

  • Adds an im alias for the dm facet to the web client, to match the API endpoint naming


Mar 12, 2016

  • Adds promise support to the RTM client send and sendMessage methods
  • Fixes the way message response callbacks work, so that the success case is only called when the websocket receives a message with a reply_to matching the id of the dispatched message, instead of when the ws instance signals message send success
  • Fixes the way getAPICallArgs works, to correctly pull data out of the opts arg


Mar 5, 2016

  • Adds promises to the Slack clients. If no callback is passed to an API call, a promise will be created and returned instead.
  • Logs a warning if an API response with a warning key is received


Mar 1, 2016

  • Fixes a crash introduce in 2.0.5 if you try and instantiate a WebClient without passing in any options


Mar 1, 2016

  • Updates the way that API requests are throttled to:
    • avoid a condition where the request queue callback could be called multiple times, causing a crash
    • refactor the logic in _callTransport into multiple functions to make it easier to follow
  • Updates dev dependencies:
    • eslint
    • nock
    • eslint-config-airbnb


Feb 28, 2016

  • Caches messages on the RTM client, to improve handling in cases where message send fails
  • Removes the handler for the websocket level ping handler (not the RTM API level ping handler)
  • Refactors the logic for handling ws send responses to a single function


Feb 28, 2016

  • Passes through the logLevel param to the getLogger function


Feb 28, 2016

  • The RTM AUTHENTICATED event now also emits the rtm.start payload
  • Fixes the way that loggers are instantiated and used, so that the JSDoc for opts.logger is correct


Feb 15, 2016

  • Adds coveralls to the repo, to track code coverage and display a badge in the README
  • Updates the disconnect function on the RTM client to support both an error message and a code or reason for the disconnect, e.g. account_inactive
  • Updates the message-handlers for team_xxx events to set the team back to the data-store once changes are made


Feb 13, 2016


Feb 13, 2016

Refactors the library to javascript, adds a lot of tests and restructures it to improve maintainability and extend functionality.

  • Creates two separate clients:
    • RTM; manages connection to Slack’s RTM API, including reconnects
    • Web; provideas a callback interface to all of Slack’s Web API endpoints
  • Moves the memory data store implementation off the clients and into its own class
  • Uncouples the model objects from the clients; model functions to send messages to channels etc are now accessed via the web and RTM client
  • Moves the transport layer (websockets and HTTP) to a pluggable model, so that complex transports (through request proxies etc) can be handled
  • Adds test coverage on most core functionality in the library


Dec 15, 2015

  • Adds support for a request-proxy URL to use the client from behind a proxy


Dec 1, 2015

  • Updates the ws library from 0.4.3 to 0.8.1
  • Reconnects when a team_migration_started event is received
  • Supports finding users by email from the memory data store
  • Fixes the getUnreadCount and getChannelsWithUnreads functions
  • Emits error code and message when the ws closes
  • Removes no-op call when a ping is received on the websocket


Feb 25, 2015

  • Added callbacks to all API calls (#20)
  • Added support for star added/delete events (#27
  • Fixed sample code (#18)
  • getChannelByName now strips leading hash marks (#9)
  • Dropped support for Node 0.8 (#25)
  • Fix duplicate scripts entries in package.json (230c7f74)


Feb 3, 2015

  • Added ability to call chat.postMessage Web API method (#15)
  • Added ability to update and delete messages (#14 and #17)
  • Added sample code (7ee93a7b)
  • Fixed getChannelsWithUnreads (#8)
  • Fixed race condition when emitting open event (#19)


Dec 16, 2014

  • Compile coffeescript to JS before publishing to NPM (#6)
  • Fixed typo in docs (#2)


Dec 8, 2014

  • First public release

subscribe via RSS