Link Search Menu Expand Document

Constructor: authorization

Back to constructors index

Logged-in session

Attributes:

NameTypeRequiredDescription
currentBoolOptionalWhether this is the current session
official_appBoolOptionalWhether the session is from an official app
password_pendingBoolOptionalWhether the session is still waiting for a 2FA password
encrypted_requests_disabledBoolOptionalWhether this session will accept encrypted chats
call_requests_disabledBoolOptionalWhether this session will accept phone calls
unconfirmedBoolOptionalWhether the session is unconfirmed, see here » for more info.
hashlongYesIdentifier
device_modelstringYesDevice model
platformstringYesPlatform
system_versionstringYesSystem version
api_idintYesAPI ID
app_namestringYesApp name
app_versionstringYesApp version
date_createdintYesWhen was the session created
date_activeintYesWhen was the session last active
ipstringYesLast known IP
countrystringYesCountry determined from IP
regionstringYesRegion determined from IP

Type: Authorization

Example:

$authorization = ['_' => 'authorization', 'current' => Bool, 'official_app' => Bool, 'password_pending' => Bool, 'encrypted_requests_disabled' => Bool, 'call_requests_disabled' => Bool, 'unconfirmed' => Bool, 'hash' => long, 'device_model' => 'string', 'platform' => 'string', 'system_version' => 'string', 'api_id' => int, 'app_name' => 'string', 'app_version' => 'string', 'date_created' => int, 'date_active' => int, 'ip' => 'string', 'country' => 'string', 'region' => 'string'];