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
-
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 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 -
init(id:isCurrent:isPasswordPending:apiId:applicationName:applicationVersion:isOfficialApplication:deviceModel:platform:systemVersion:logInDate:lastActiveDate:ip:country:region:)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
idSession identifier
isCurrentTrue, if this session is the current session
isPasswordPendingTrue, if a password is needed to complete authorization of the session
apiIdTelegram API identifier, as provided by the application
applicationNameName of the application, as provided by the application
applicationVersionThe version of the application, as provided by the application
isOfficialApplicationTrue, if the application is an official application or uses the api_id of an official application
deviceModelModel of the device the application has been run or is running on, as provided by the application
platformOperating system the application has been run or is running on, as provided by the application
systemVersionVersion of the operating system the application has been run or is running on, as provided by the application
logInDatePoint in time (Unix timestamp) when the user has logged in
lastActiveDatePoint in time (Unix timestamp) when the session was last used
ipIP address from which the session was created, in human-readable format
countryA two-letter country code for the country from which the session was created, based on the IP address
regionRegion code from which the session was created, based on the IP address
View on GitHub
Install in Dash
Session Structure Reference