Skip to content

getChat

Sahri Riza Umami edited this page Jun 9, 2017 · 4 revisions

Returns information about a chat by its identifier, offline request if current user is not a bot.

getChat(chat_id)
Option Description
chat_id Chat identifier.

Example

getChat(194211431)

Response:

{
  ID = "Chat",
  draft_message_ = false,
  id_ = 194211431,
  last_read_inbox_message_id_ = "16018046976",
  last_read_outbox_message_id_ = 0,
  notification_settings_ = {
    ID = "NotificationSettings",
    mute_for_ = 0,
    show_preview_ = true,
    sound_ = "default"
  },
  order_ = "6429533194202135468",
  photo_ = {
    ID = "ChatPhoto",
    big_ = {
      ID = "File",
      id_ = 2,
      path_ = false,
      persistent_id_ = "AQADBQADW6gxG2dukwsACBVQyjIABC8HS8ezO2hr1XkDAAEC",
      size_ = 0
    },
    small_ = {
      ID = "File",
      id_ = 1,
      path_ = false,
      persistent_id_ = "AQADBQADW6gxG2dukwsACBVQyjIABAt-RZr5h2xE03kDAAEC",
      size_ = 0
    }
  },
  reply_markup_message_id_ = 0,
  title_ = "Abon Ketimus",
  top_message_ = {
    ID = "Message",
    can_be_deleted_ = true,
    can_be_edited_ = true,
    chat_id_ = 194211431,
    content_ = {
      ID = "MessageText",
      entities_ = {},
      text_ = "tis",
      web_page_ = false
    },
    date_ = 1496992352,
    edit_date_ = 0,
    forward_info_ = false,
    id_ = "16018046976",
    is_post_ = false,
    reply_markup_ = false,
    reply_to_message_id_ = 0,
    send_state_ = {
      ID = "MessageIsIncoming"
    },
    sender_user_id_ = 194211431,
    ttl_ = 0,
    ttl_expires_in_ = 0,
    via_bot_user_id_ = 0,
    views_ = 0
  },
  type_ = {
    ID = "PrivateChatInfo",
    user_ = {
      ID = "User",
      first_name_ = "Abon",
      foreign_link_ = {
        ID = "LinkStateKnowsPhoneNumber"
      },
      have_access_ = true,
      id_ = 194211431,
      is_verified_ = false,
      last_name_ = "Ketimus",
      my_link_ = {
        ID = "LinkStateKnowsPhoneNumber"
      },
      phone_number_ = "REDACTED",
      profile_photo_ = {
        ID = "ProfilePhoto",
        big_ = {
          ID = "File",
          id_ = 2,
          path_ = false,
          persistent_id_ = "AQADBQADW6gxG2dukwsACBVQyjIABC8HS8ezO2hr1XkDAAEC",
          size_ = 0
        },
        id_ = "834131745110599771",
        small_ = {
          ID = "File",
          id_ = 1,
          path_ = false,
          persistent_id_ = "AQADBQADW6gxG2dukwsACBVQyjIABAt-RZr5h2xE03kDAAEC",
          size_ = 0
        }
      },
      restriction_reason_ = false,
      status_ = {
        ID = "UserStatusOnline",
        expires_ = 1496992652
      },
      type_ = {
        ID = "UserTypeGeneral"
      },
      username_ = false
    }
  },
  unread_count_ = 0
}

Test script
Frequently Asked Questions
The Functions

Clone this wiki locally