Telegram CoPilot icon

Telegram CoPilot

Your Personal Telegram CoPilot

Overview

This node operation closes an active chat session in Telegram using the Telegram CoPilot API. It is useful for managing chat sessions programmatically, such as ending conversations or cleaning up chat states in automated workflows. For example, it can be used to close a chat after a customer support interaction is completed or to programmatically manage chat lifecycle in a Telegram bot integration.

Use Case Examples

  1. Close a chat session by providing the chat ID to end the conversation.
  2. Automate chat management by closing inactive or completed chats in bulk.

Properties

Name Meaning
Chat ID The unique identifier of the chat to be closed. This is required to specify which chat session should be closed.

Output

JSON

  • chat_id - The ID of the chat that was closed.
  • result - The response from the Telegram API indicating the success or failure of the close chat operation.

Dependencies

  • Requires an API key credential for Telegram CoPilot API authentication.

Troubleshooting

  • If the node throws an error stating 'Please login', it means the Telegram account is not logged in. Use the login operation with phone number and code to authenticate.
  • Errors like 'A closed client cannot be reused' or 'Unauthorized' indicate session issues; re-login is required.
  • Ensure the provided chat ID is valid and the bot or user has permission to close the chat.
  • If the operation fails, check network connectivity and API limits.

Links

Discussion