The Conversations API is required to work with channels consistently

Published:Thursday, September 6, 2018

Unless your app uses the Conversations API, you'll encounter unusual results working with more exotic channel types, like shared channels and those channels converted from public to private.

What's changing?

Users have converted channels from public to private for some time. Historically, the channel wouldn't transition so much as migrate from one container type to the other. The channel ID would even change and your app would have scant evidence left behind to understand it.

Recently we began preserving the channel ID of channels converted from public to private. Like shared channels before them, they are no longer listed in legacy methods like channels.list or groups.list.

The only way to confidently and reliably determine a channel's "type" and privacy settings is by using the Conversations API, a family of methods that completely replace all the channels.*, im.*, mpim.*, and groups.* API methods.

Let conversational booleans like is_private guide you in understanding just what kind of conversation you're having β€” it's important to avoid relying on more heuristics like the first character in a channel ID string.

How do I prepare?

Investigate which methods you use when looking up "channel" information and convert to using the conversations.* equivalent.

For example, if you use channels.info, use conversations.info instead. Instead of mpim.list, use conversations.list.

Method signatures and responses to these methods are notably different than their ancestors, supporting our unified pagination scheme and better decomposition. Some tasks, like retrieving all the members within a channel, are more complex than previously.

What if I do nothing?

If knowing whether a channel is private or not is important to your app, your app might act inappropriately when it doesn't have all the information it needs.

If you display lists of channels to users and don't use the Conversations API, you might miss channels that have transitioned from public to private or back again.

You will continue to miss out on feature enhancements like shared channels, additional metadata, and simplified approaches to app development.

When does this happen?

Channels are already moving between public and private states today. It happens to shared channels and non-shared channels alike.

It's important to use the Conversations API to make everything work right.