Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QtTelegrambot not receiving message from PHP



  • I´m using this library QtTelegramBot and my Qt app can send/receive messages to/from Official Telegram app and my cel phone bot.

    When I sent a message from php using a code like this:

    <?php

    $bottoken='here is my telegram token';

    $request_params=[
    "chat_id" => "my id telegram",
    "text" => "my message",
    ];

    $request_url="https://api.telegram.org/bot". $bottoken . '/sendMessage?' .http_build_query($request_params);
    file_get_contents($request_url);

    echo "sent";

    ?>

    This code sent message correctly to Official Desktop Telegram client and my cell phone. But my Qt app using QtTelegrambot library not receive anything.

    Any hint?

    Thanks a lot



  • @koahnig thanks for your response.

    Yes, i know this library is a third party....but now I understand better. When I use a PHP code to sent messages...the sender is the Bot.
    So my Qt app is the bot and it´s not possible to read it´s own messages, only message receive from others.



  • @Guapo

    Are you aware that this library is third party and uses only Qt 5?
    I would recommend to contact the author of that library for some advice.



  • @koahnig thanks for your response.

    Yes, i know this library is a third party....but now I understand better. When I use a PHP code to sent messages...the sender is the Bot.
    So my Qt app is the bot and it´s not possible to read it´s own messages, only message receive from others.


Log in to reply