Log In
Logs into a Telegram account and creates a client session.
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
- Session Name - The name for the Telegram session (used to store session data).
- Api Id - The Telegram API ID credential (stored in the vault).
- Api Hash - The Telegram API Hash credential (stored in the vault).
- Phone Number - The phone number associated with the Telegram account (stored in the vault).
Output
- Client Id - The unique identifier of the created Telegram client session.
How It Works
The Log In node authenticates with Telegram and creates a client session. When executed, the node:
- Validates the provided credentials (Api Id, Api Hash, and Phone Number)
- Validates the Session Name
- Creates a new TelegramClient with the provided credentials
- Connects to Telegram
- Checks if the user is already authorized:
- If not authorized, sends a code request to the phone number
- Opens a GUI window to enter the received code
- Completes the sign-in process with the code
- Adds the client to the client registry
- Returns the Client Id for use in other Telegram nodes
Requirements
- Valid Telegram API credentials (API ID and API Hash)
- Valid phone number associated with a Telegram account
- Valid Session Name
Error Handling
The node will return specific errors in the following cases:
- Empty or invalid Api Id
- Empty or invalid Api Hash
- Empty or invalid Phone Number
- Empty or invalid Session Name
Usage Notes
- All sensitive credentials (Api Id, Api Hash, Phone Number) are stored in the vault for security
- The Session Name is used to persist session data between runs
- A GUI window will appear during first-time login to enter the verification code sent to the phone
- The returned Client Id is used in other Telegram nodes to identify which session to use
- Multiple sessions can be created with different Session Names