Search

Remove From Channel

Last Updated: Feb 14, 2022

Articles

Use this function to remove users from the given channel.

Syntax

Remove From Channel (token, channel_id, user_id)

Parameters

Input Parameter Name Description
token Authentication token
channel_id ID of the channel to remove the user
user_id ID of the user to be removed from the channel

  • To know more about token, click here.
  • To view the Channel ID, right click on the channel name in the left menu and select Copy link in Slack. Paste in a text editor, the URL is of the format: https://<Slack URL>/<Channel ID>.
  • To view the User ID, navigate to the user's profile, click the more icon and choose Copy member ID.

Returns

Return Value Description
Output
  • On Success returns 1 | Removed The User Successfully
  • On Failure returns 0 | Error Message

Sample

Remove From Channel (xoxp-12QWERT, ABC123, PPL223)

  • Uses token xoxp-12QWERT to authenticate connection to Slack, removes the user with ID PPL223 from channel with ID ABC123.
    Returns Removed The User Successfully on removing the user.

To view all the Slack functions, click here.

Did you find what you were looking for?