public static class TdApi.Session extends TdApi.Object
| Modifier and Type | Field and Description |
|---|---|
int |
apiId
Telegram API identifier, as provided by the application.
|
java.lang.String |
applicationName
Name of the application, as provided by the application.
|
java.lang.String |
applicationVersion
The version of the application, as provided by the application.
|
boolean |
canAcceptCalls
True, if incoming calls can be accepted by the session.
|
boolean |
canAcceptSecretChats
True, if incoming secret chats can be accepted by the session.
|
static int |
CONSTRUCTOR
Identifier uniquely determining type of the object.
|
java.lang.String |
deviceModel
Model of the device the application has been run or is running on, as provided by the application.
|
long |
id
Session identifier.
|
java.lang.String |
ipAddress
IP address from which the session was created, in human-readable format.
|
boolean |
isCurrent
True, if this session is the current session.
|
boolean |
isOfficialApplication
True, if the application is an official application or uses the apiId of an official application.
|
boolean |
isPasswordPending
True, if a 2-step verification password is needed to complete authorization of the session.
|
boolean |
isUnconfirmed
True, if the session wasn't confirmed from another session.
|
int |
lastActiveDate
Point in time (Unix timestamp) when the session was last used.
|
java.lang.String |
location
A human-readable description of the location from which the session was created, based on the IP address.
|
int |
logInDate
Point in time (Unix timestamp) when the user has logged in.
|
java.lang.String |
platform
Operating system the application has been run or is running on, as provided by the application.
|
java.lang.String |
systemVersion
Version of the operating system the application has been run or is running on, as provided by the application.
|
TdApi.SessionType |
type
Session type based on the system and application version, which can be used to display a corresponding icon.
|
| Constructor and Description |
|---|
Session()
Contains information about one session in a Telegram application used by the current user.
|
Session(long id,
boolean isCurrent,
boolean isPasswordPending,
boolean isUnconfirmed,
boolean canAcceptSecretChats,
boolean canAcceptCalls,
TdApi.SessionType type,
int apiId,
java.lang.String applicationName,
java.lang.String applicationVersion,
boolean isOfficialApplication,
java.lang.String deviceModel,
java.lang.String platform,
java.lang.String systemVersion,
int logInDate,
int lastActiveDate,
java.lang.String ipAddress,
java.lang.String location)
Contains information about one session in a Telegram application used by the current user.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getConstructor()
Returns an identifier uniquely determining type of the object.
|
toStringpublic long id
public boolean isCurrent
public boolean isPasswordPending
public boolean isUnconfirmed
public boolean canAcceptSecretChats
public boolean canAcceptCalls
public TdApi.SessionType type
public int apiId
public java.lang.String applicationName
public java.lang.String applicationVersion
public boolean isOfficialApplication
public java.lang.String deviceModel
public java.lang.String platform
public java.lang.String systemVersion
public int logInDate
public int lastActiveDate
public java.lang.String ipAddress
public java.lang.String location
public static final int CONSTRUCTOR
public Session()
public Session(long id,
boolean isCurrent,
boolean isPasswordPending,
boolean isUnconfirmed,
boolean canAcceptSecretChats,
boolean canAcceptCalls,
TdApi.SessionType type,
int apiId,
java.lang.String applicationName,
java.lang.String applicationVersion,
boolean isOfficialApplication,
java.lang.String deviceModel,
java.lang.String platform,
java.lang.String systemVersion,
int logInDate,
int lastActiveDate,
java.lang.String ipAddress,
java.lang.String location)
id - Session identifier.isCurrent - True, if this session is the current session.isPasswordPending - True, if a 2-step verification password is needed to complete authorization of the session.isUnconfirmed - True, if the session wasn't confirmed from another session.canAcceptSecretChats - True, if incoming secret chats can be accepted by the session.canAcceptCalls - True, if incoming calls can be accepted by the session.type - Session type based on the system and application version, which can be used to display a corresponding icon.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 apiId 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.ipAddress - IP address from which the session was created, in human-readable format.location - A human-readable description of the location from which the session was created, based on the IP address.public int getConstructor()
TdApi.ObjectgetConstructor in class TdApi.Object