0

I lost access to my old telegram account that had a bot on it with some important stuff. There are still messages incoming on the bot on my old account. I still have the HTTP API token, and have heard that I can access the bot from another telegram account with the token as I have seen others do, but I do not know how. Basically I need access to see the messages my bot is sending to my old telegram account without actually having access to my old telegram account. Can someone please help me, I have tried using the localhost telegram bot source codes and stuff but have had no luck in figuring it out.

1 Answers1

0

Do you still have the code?

If yes set a new webhook in this way, type online:

https://api.telegram.org/bot   TOKEN   /setWebhook?url=https://   THE SCRIPT ON YOUR HOST (USE HTTPS)

then insert at the end of the script:

switch($id){
    case '   YOUR ID   ': ## BE AWARE, ID IS NOT USERNAME, BUT AN AUTOGENERATED NUMBER STRING
        $myfile = fopen('mymessages.txt', 'a+');
        fwrite($myfile, $message); ## Put the name you gave to the variable which contains the message
        fclose($myfile);
        break;
}
M1001
  • 144
  • 1
  • 11