The Slack Developer Blog. Other Slack news, features and tips can be found at http://slackhq.com but this? This is all API, all the time

Apr 26, 2016

Changes to file events in the Real-Time Messaging API

If you parse events referencing files in the real-time messaging API, you may have noticed we send a sometimes comically large packet of information when streaming nearly anything related to a file.

To improve performance and provide a better user experience, we’re reducing the payload of most file-related events in the RTM API to include only the file’s ID. You’ll need to use the files.info API method to retrieve additional information about files.

These changes will roll out gradually beginning May 16th, 2016 — read below to understand how this change may effect you, especially if you work with bot users.

Bot users will gain comparable capabilities, allowing bot user tokens to work with files.info based on the channel memberships and related capabilities granted to them.

How these events will change

This id value may be used with the files.info API method to obtain fresh information about the file it represents. We’ll also include a top-level file_id field, which you may want to use going forward instead.

Until now, these events would have had more verbose file details included:

Bot users

Today, some bot users may rely on the current behavior to utilize or index files referenced in the channels they belong to. To support that use case, we will improve the files.info method to make it accessible to bot users and scoped only to the files that a bot has access to when using its bot user token.

We’ll post a follow up within the next two weeks when we’re ready to release these new capabilities.

Update,April 27th, 2016: Bot user tokens may now use files.info to retrieve information about files appearing in the channels they belong to.

How to prepare:

Review your streaming integration to determine where and when you rely on the full file object being present in events. If you don’t need the full file object, consume only the file ID. If you need the full file object, request it using files.info.

When it’s happening:

May 16th, 2016.

We want to make these improvements as soon as possible, beginning a gradual roll out on May 16th, 2016. If you believe that your application, custom integration, or third party library will outright break or non-gracefully degrade as a result of this change, please let us know immediately so we may work together to make this transition as seamless as possible.