Telegram Client icon

Telegram Client

Use Telegram Client API

Overview

The node interacts with the Telegram Client API to perform various chat-related operations. Specifically, the "Get Chat Members" operation retrieves a list of members from a specified Telegram chat or channel. This is useful for scenarios where you need to analyze or manage participants in a group, such as sending targeted messages, auditing membership, or integrating member data into other workflows.

Practical examples:

  • Fetching all members of a Telegram group to export their usernames and IDs.
  • Monitoring membership changes by periodically retrieving the current list of chat members.
  • Integrating Telegram group member data with CRM or marketing tools.

Properties

Name Meaning
Chat ID The identifier or username of the chat/channel (e.g., @username or -100xxxx) to query.
Options Additional parameters:
- Silent: (boolean) Not applicable for this operation but available for others.
- Caption: (string) Not applicable here.
- Parse Mode: (none, markdown, html) Not applicable here.
- Limit: (number) Maximum number of chat members to return (default 100).

Output

The output JSON contains:

  • success: Boolean indicating if the operation succeeded.
  • members: An array of member objects representing the participants of the chat. Each member object includes details about the user in the chat.

Example output structure:

{
  "success": true,
  "members": [
    {
      // Member details such as user id, username, status, etc.
    },
    ...
  ]
}

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 Telegram.
  • Network access to Telegram servers is necessary.
  • No additional environment variables are required beyond the API credentials.

Troubleshooting

  • No credentials provided: The node will throw an error if the Telegram API credentials are missing or invalid. Ensure that the API key, session, and related authentication details are correctly configured.
  • Connection issues: Network problems or incorrect API credentials can cause connection failures. Verify internet connectivity and credential correctness.
  • Limit parameter: Setting the limit too high may result in timeouts or partial data. Use reasonable limits based on expected chat size.
  • Unsupported operation error: If the operation parameter is set incorrectly, the node will throw an error indicating the operation is not supported.
  • Permission errors: The authenticated Telegram client must have permission to access the chat members list; otherwise, the request may fail.

Links and References

Discussion