Skip to content

getActiveSessions

Sahri Riza Umami edited this page Jul 1, 2018 · 3 revisions

Returns all active sessions of the current user.

getActiveSessions(callback, data)

Example

  • Get all active sessions of the current user.

    getActiveSessions()

    Response:

    {
      ["@type"] = "sessions",
      sessions = {
        {
          ["@type"] = "session",
          api_id = 2899,
          application_name = "TelegramCli",
          application_version = "1.6.3, TDLib 1.2.0",
          country = "Jakarta Raya, Indonesia",
          device_model = "Unix/Console/Bot",
          id = "0",
          ip = "114.4.214.15",
          is_current = true,
          is_official_application = false,
          last_active_date = 1530435668,
          log_in_date = 1527621580,
          platform = "Unix Console",
          region = "",
          system_version = "UNIX/??"
        },
        {
          ["@type"] = "session",
          api_id = 6,
          application_name = "Telegram Android",
          application_version = "4.8.10",
          country = "Jakarta Raya, Indonesia",
          device_model = "XiaomiMi-4c",
          id = "2643332864221423305",
          ip = "114.4.214.15",
          is_current = false,
          is_official_application = true,
          last_active_date = 1530432870,
          log_in_date = 1518830230,
          platform = "Android",
          region = "",
          system_version = "SDK 24"
        },
        {
          ["@type"] = "session",
          api_id = 2040,
          application_name = "Telegram Desktop",
          application_version = "1.3.9",
          country = "Jakarta Raya, Indonesia",
          device_model = "PC 64bit",
          id = "4352388900653744656",
          ip = "114.4.214.15",
          is_current = false,
          is_official_application = true,
          last_active_date = 1530422100,
          log_in_date = 1527210447,
          platform = "",
          region = "",
          system_version = "Linux GNOME"
        }
      }
    }

Frequently Asked Questions
The Functions

Clone this wiki locally