Answer the question
In order to leave comments, you need to log in
An invalid Peer error when using Telethon. How to fix?
Hello. I use the Telethon library to interact with the Telegram API.
The code:
receiver = InputPeerUser(user['id'], user['access_hash'])
await client(SendMessageRequest(receiver, message))
An invalid Peer was used. Make sure to pass the right peer type and that the value is valid (for instance, bots cannot start conversations) (caused by SendMessageRequest)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question