Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

The node interacts with the Telegram Client API to perform various operations related to Telegram users, messages, chats, and media. Specifically, for the Get User Info operation, it retrieves detailed information about a specified Telegram user by their user ID or username.

This node is beneficial in scenarios where you need to fetch user profile details programmatically, such as:

  • Verifying user identity before processing further actions.
  • Displaying user information in dashboards or reports.
  • Automating workflows that depend on user metadata from Telegram.

Example use case: Automatically retrieving and logging user details when a new user interacts with your Telegram bot or channel.

Properties

Name Meaning
User ID The unique identifier or username of the Telegram user whose information you want to get.
Options A collection of optional parameters (not used in this operation but available generally).

Note: For the Get User Info operation, only the User ID property is required and relevant.

Output

The output JSON contains:

  • success: Boolean indicating if the operation was successful (true).
  • user: An object representing the Telegram user entity retrieved. This includes all available user information as returned by the Telegram Client API, such as username, first name, last name, status, and other profile details.

Example output snippet:

{
  "success": true,
  "user": {
    "id": 123456789,
    "username": "exampleuser",
    "firstName": "John",
    "lastName": "Doe",
    ...
  }
}

No binary data is output by this operation.

Dependencies

  • Requires an active Telegram Client API credential with valid session, API ID, and API hash.
  • Uses the Telegram Client SDK internally to connect and interact with Telegram servers.
  • The node must be configured with these credentials in n8n prior to execution.

Troubleshooting

  • No credentials provided: The node will throw an error if the Telegram Client API credentials are missing or invalid. Ensure credentials are properly set up in n8n.
  • Authentication failed: If the session or API keys are incorrect or expired, authentication will fail. Re-authenticate or update credentials.
  • User not found or invalid User ID: If the provided user ID or username does not exist or is malformed, the node may throw an error or return no user data.
  • Network or connection issues: Temporary connectivity problems with Telegram servers can cause failures. Retrying later or checking network settings may help.
  • Operation not supported: Using an unsupported operation value will result in an error.

To resolve errors, verify input parameters, ensure valid credentials, and check network connectivity.

Links and References

Discussion