Search

Invite To Channel

Last Updated: Feb 14, 2022

Articles

Use this function to invite users to the given channel.

Syntax

Invite To Channel (token, channel_id, user_id)

Parameters

Input Parameter Name Description
token Authentication token
channel_id ID of the channel to be invited to
user_id ID of the user to Invite

  • 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 | Invited Successfully
  • On Failure returns 0 | Error Message

Sample

Invite To Channel (xoxp-12QWERT, ABC123, PPL223)

  • Uses token xoxp-12QWERT to authenticate connection to Slack, invites user with ID PPL223 to channel with ID ABC123.
    Returns Invited Successfully on inviting the user.

To view all the Slack functions, click here.

Did you find what you were looking for?