Skip to content

getUser

Sahri Riza Umami edited this page Jun 6, 2018 · 7 revisions

Returns information about a user by their identifier.
This is an offline request if the current user is not a bot.

getUser(user_id)
Field Type Description
user_id int32 User identifier

Example

  • Get information about user 24904272.

    getUser(24904272)

    Response:

    {
      ["@type"] = "user",
      first_name = "Mentari",
      have_access = true,
      id = 24904272,
      incoming_link = {
        ["@type"] = "linkStateNone"
      },
      is_verified = false,
      language_code = "",
      last_name = "",
      outgoing_link = {
        ["@type"] = "linkStateNone"
      },
      phone_number = "",
      profile_photo = {
        ["@type"] = "profilePhoto",
        big = {
          ["@type"] = "file",
          expected_size = 0,
          id = 6,
          ["local"] = {
            ["@type"] = "localFile",
            can_be_deleted = false,
            can_be_downloaded = true,
            downloaded_prefix_size = 0,
            downloaded_size = 0,
            is_downloading_active = false,
            is_downloading_completed = false,
            path = ""
          },
          remote = {
            ["@type"] = "remoteFile",
            id = "AQADBQADzacxG1ACfAEACLIXHSwABDkQ5rMLq76zojAAAgI",
            is_uploading_active = false,
            is_uploading_completed = true,
            uploaded_size = 0
          },
          size = 0
        },
        id = "106963034226927565",
        small = {
          ["@type"] = "file",
          expected_size = 0,
          id = 5,
          ["local"] = {
            ["@type"] = "localFile",
            can_be_deleted = false,
            can_be_downloaded = true,
            downloaded_prefix_size = 0,
            downloaded_size = 0,
            is_downloading_active = false,
            is_downloading_completed = false,
            path = ""
          },
          remote = {
            ["@type"] = "remoteFile",
            id = "AQADBQADzacxG1ACfAEACLIXHSwABGJb2dSNxephoDAAAgI",
            is_uploading_active = false,
            is_uploading_completed = true,
            uploaded_size = 0
          },
          size = 0
        }
      },
      restriction_reason = "",
      status = {
        ["@type"] = "userStatusOnline",
        expires = 1517920511
      },
      type = {
        ["@type"] = "userTypeRegular"
      },
      username = "kuncen"
    }  

Frequently Asked Questions
The Functions

Clone this wiki locally