Skip to content
a-sync edited this page May 3, 2023 · 10 revisions

Slack's channel-like IDs:

U - User / member ID (message via slackbot IM) eg. U12345678
D - Direct Message (IM, MPDM(Multi-Party Direct Message)) eg. D12345678
C - Channel (Public) eg. C12345678
G - Group (Private Channel) eg. G12345678

recipient-types


@username format as a recipient (-r) is deprecated! Slack API support was removed on 2018-09-12.

Replace it with direct message channel ID or member ID.
https://api.slack.com/custom-integrations/incoming-webhooks#channel_override

We are phasing out support for ambiguously passing a "username" as a channel value. Please always use channel-like IDs instead.

(source: https://api.slack.com/methods/chat.postMessage#channels)

Just one more thing: channels
Consider a future where mentioning channels required using only its ID and channel names were not necessarily unique or following the same structure as #channel names today. That future will one day arrive. Get ahead of the curve and use channel IDs for all indexing and storage organization.

(source: https://api.slack.com/changelog/2017-09-the-one-about-usernames)

Clone this wiki locally