Closed ghost closed 7 years ago
RESOLVED. This is the correct code: var peer = new InputPeerForeignConstructor(user.id, user.accessHash);
Yes, for such contracts you should use constructors, they'll give you a correct list of fields needed for creation. Empty constructors are mainly supported for internal needs like object creation via reflection.
Hello,
I am trying to send a message to a telegram bot using the following code:
I am getting the following error: {"BadRequest - PEER_ID_INVALID"} Would you please clarify what I am doing wrong?
I also see that there is the second parameter in the InputPeerForeignConstructor class (accessHash) but I am not sure how to get it and whether I need it.
Thanks