Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

This node integrates with the Telegram Client API to perform various messaging and chat-related operations. Specifically, the "Get User Info" operation retrieves detailed information about a Telegram user by their user ID or username.

Common scenarios where this node is beneficial include:

  • Fetching profile details of a user for customer support or CRM integration.
  • Verifying user identity before sending messages or granting access.
  • Gathering user metadata for analytics or reporting purposes.

Practical example:

  • You want to get the full profile information of a Telegram user who interacted with your bot, so you use this node with the "Get User Info" operation and provide the user's ID or username.

Properties

Name Meaning
User ID The Telegram user ID or username whose information you want to retrieve (required).
Options Additional optional parameters:
  Silent Send message silently without notification (boolean).
  Caption Caption text for media messages (string).
  Parse Mode How to parse message text; options are None, Markdown, or HTML.
  Limit Maximum number of items to return (number), used in some operations but not relevant here.

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

Output

The output JSON object contains:

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

Example output snippet:

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

No binary data is output by this operation.

Dependencies

  • Requires an active Telegram Client API credential with valid session, API ID, and API hash.
  • The node uses the Telegram Client SDK internally to connect and interact with the Telegram API.
  • Network connectivity to Telegram servers is necessary.
  • No additional environment variables are required beyond the provided credentials.

Troubleshooting

  • No credentials provided: The node will throw an error if the Telegram Client API credentials are missing or invalid. Ensure that the API ID, API hash, and session string are correctly configured.
  • Authentication failed: If the connection to Telegram fails during authentication, verify that the credentials are correct and have not expired.
  • User not found or invalid User ID: If the specified user ID or username does not exist or is incorrect, the node may throw an error or return no user data. Double-check the input value.
  • Network issues: Connection problems to Telegram servers can cause timeouts or failures. Check network connectivity and firewall settings.
  • Operation not supported: Using an unsupported operation value will result in an error. Confirm that "getUserInfo" is selected.

To resolve errors, review the error message returned by the node, verify inputs and credentials, and ensure proper network access.

Links and References

Discussion