Encountering "Encrypted data invalid" error while using message.click() method in Telethon

19 views Asked by At

I'm developing a app using Telethon, and I'm using the message.click() method to click on buttons in messages. However, I'm encountering an "Encrypted data invalid" error when using this method. I'm unable to determine the source of my problem and I need help on how to resolve it.

Below, I'm sharing the code snippet I'm using:

async def send_response(self, chat_id, message_id, button_data, button_text):
    try:
        message = await self.client.get_messages(chat_id, ids=message_id)
        if button_data:
            await message.click(data=button_data)
        else:
            await message.click(text=button_text)
        return True
    except Exception as e:
        return False

Here is the error message I'm encountering:

Encrypted data invalid (caused by GetBotCallbackAnswerRequest)

Any help or suggestions on resolving this issue would be greatly appreciated. Thank you in advance.

0

There are 0 answers