Skip to main content

member_left_channel event

A user left a public or private channel

Facts

Required Scopes
Compatible APIs

Usage info

This example includes both the event wrapper and the event structure for the member_left_channel event.

{
"token": "XXYYZZ",
"team_id": "T123ABC456",
"api_app_id": "A123ABC456",
"event": {
"type": "member_left_channel",
"user": "W123ABC456",
"channel": "C123ABC456",
"channel_type": "C",
"team": "T123ABC456"
},
"type": "event_callback",
"authed_users": [
"U123ABC456",
"U222222222"
],
"event_id": "Ev123ABC456",
"event_time": 123456789
}

The member_left_channel event is sent to all websocket connections and event subscriptions when users leave public or private channels.

PropertyDescription
userUser ID belonging to the user that left the channel.
channelChannel ID for a public channel or private channel (AKA group).
channel_typeA single letter indicating the type of channel used in channel. Private channels created before March 2021 have a G prefix. Both public and private channels created after March 2021 have a C prefix. If you need to know the channel type, use the conversations.info method.
teamTeam ID, identifying which workspace the user is from.

This event is supported as a bot user subscription in the Events API. Workspace event subscriptions are also available for tokens holding at least one of the channels:read or groups:read scopes. Which events your app will receive depends on the scopes and their context. For instance, you'll only receive member_left_channel events for private channels if your app has the groups:read permission.