Search

Invite To Channel

Last Updated: Nov 4, 2020

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

Returns

Return Value Description
Output
  • On Success: 1 | Invited Successfully
  • On Failure: 0 | Error Message

Sample

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

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

To view the Channel ID, right click on the channel name in the left menu and select Copy link in the Slack application. 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.

To view all the Slack functions, click here.

Did you find what you were looking for?