Session

public struct Session : Codable, Equatable, FunctionResult

Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order

  • id

    Session identifier

    Declaration

    Swift

    public let id: TDInt64
  • True, if this session is the current session

    Declaration

    Swift

    public let isCurrent: Bool
  • True, if a password is needed to complete authorization of the session

    Declaration

    Swift

    public let isPasswordPending: Bool
  • Telegram API identifier, as provided by the application

    Declaration

    Swift

    public let apiId: Int32
  • Name of the application, as provided by the application

    Declaration

    Swift

    public let applicationName: String
  • The version of the application, as provided by the application

    Declaration

    Swift

    public let applicationVersion: String
  • True, if the application is an official application or uses the api_id of an official application

    Declaration

    Swift

    public let isOfficialApplication: Bool
  • Model of the device the application has been run or is running on, as provided by the application

    Declaration

    Swift

    public let deviceModel: String
  • Operating system the application has been run or is running on, as provided by the application

    Declaration

    Swift

    public let platform: String
  • Version of the operating system the application has been run or is running on, as provided by the application

    Declaration

    Swift

    public let systemVersion: String
  • Point in time (Unix timestamp) when the user has logged in

    Declaration

    Swift

    public let logInDate: Int32
  • Point in time (Unix timestamp) when the session was last used

    Declaration

    Swift

    public let lastActiveDate: Int32
  • ip

    IP address from which the session was created, in human-readable format

    Declaration

    Swift

    public let ip: String
  • A two-letter country code for the country from which the session was created, based on the IP address

    Declaration

    Swift

    public let country: String
  • Region code from which the session was created, based on the IP address

    Declaration

    Swift

    public let region: String
  • Contains information about one session in a Telegram application used by the current user. Sessions should be shown to the user in the returned order

    Declaration

    Swift

    public init(id: TDInt64, isCurrent: Bool, isPasswordPending: Bool, apiId: Int32, applicationName: String, applicationVersion: String, isOfficialApplication: Bool, deviceModel: String, platform: String, systemVersion: String, logInDate: Int32, lastActiveDate: Int32, ip: String, country: String, region: String)

    Parameters

    id

    Session identifier

    isCurrent

    True, if this session is the current session

    isPasswordPending

    True, if a password is needed to complete authorization of the session

    apiId

    Telegram API identifier, as provided by the application

    applicationName

    Name of the application, as provided by the application

    applicationVersion

    The version of the application, as provided by the application

    isOfficialApplication

    True, if the application is an official application or uses the api_id of an official application

    deviceModel

    Model of the device the application has been run or is running on, as provided by the application

    platform

    Operating system the application has been run or is running on, as provided by the application

    systemVersion

    Version of the operating system the application has been run or is running on, as provided by the application

    logInDate

    Point in time (Unix timestamp) when the user has logged in

    lastActiveDate

    Point in time (Unix timestamp) when the session was last used

    ip

    IP address from which the session was created, in human-readable format

    country

    A two-letter country code for the country from which the session was created, based on the IP address

    region

    Region code from which the session was created, based on the IP address