Skip to main content

Invite User To Channel

Invites a user to a Telegram channel.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Client Id - The unique identifier of the Telegram client to use for this operation.
  • Channel - The channel to which the user will be invited (can be a username, chat ID, or other channel identifier).
  • User Id - The unique identifier of the user to invite.
  • Access Hash - The access hash of the user to invite.

How It Works

The Invite User To Channel node invites a user to a Telegram channel. When executed, the node:

  1. Validates the provided inputs (Client Id, Channel, User Id, and Access Hash)
  2. Retrieves the channel entity using the Telegram client
  3. Creates an InputUser object with the provided User Id and Access Hash
  4. Uses the Telegram client to invite the user to the specified channel

Requirements

  • A valid Telegram client session with appropriate permissions
  • Valid Channel identifier
  • Valid User Id and Access Hash of the user to invite
  • Client Id must match an existing Telegram client session

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Client Id
  • Empty or invalid Channel identifier
  • Empty or invalid User Id
  • Empty or invalid Access Hash

Usage Notes

  • The Channel parameter can accept various identifiers such as usernames, chat IDs, or other channel references
  • The User Id and Access Hash are required to identify the user to invite
  • These values can typically be obtained from other Telegram nodes that return user information
  • The Client Id must correspond to an active Telegram client session