skip to Main Content

When I chat with a telegram user, I can see for each user their “last seen” – when they last connected to Telegram (even if I haven’t chatted with them for a while).

Is there a way to query for this information via the bot API? I haven’t found a way to access it.

4

Answers


  1. That’s currently not possible with the Telegram Bot API.

    Login or Signup to reply.
  2. https://core.telegram.org/bots#4-how-are-bots-different-from-humans

    Bots have no online status and no last seen timestamps, the interface shows the label ‘bot’ instead.

    Login or Signup to reply.
  3. It’s not possible with the Telegram Bot API.
    But it’s possible with Telegram API which allows you to build your own customized Telegram clients, and have other methods like read messages, or status (limited by the target users’ privacy settings, of course).

    After generate an hash to authenticate your API client on my telegram, you can use a library like Telegram-MTProto to call contacts.getStatuses which return an array of ContactStatus and know if user is online or offline.

    const getStatuses = async () => {
        const statuses = await telegram('contacts.getStatuses', {})
        // Check online status
        if(statuses[0].status._ === 'userStatusOnline')
            // Online
    }
    
    Login or Signup to reply.
  4. In plus messenger , using bot login , relative last seen is shown.

    Maybe you could ask them in their Official support group: https://t.me/plusmsgrchat (I’m blocked)

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search