MadelineProtoDocs/old_docs/API_docs_v89/constructors/authorization.md
2019-12-27 17:48:04 +01:00

2.2 KiB

title description image
authorization Logged-in session https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: authorization

Back to constructors index

Logged-in session

Attributes:

Name Type Required Description
current Bool Optional Whether this is the current session
official_app Bool Optional Whether the session is from an official app
password_pending Bool Optional Whether the session is still waiting for a 2FA password
hash long Yes Identifier
device_model string Yes Device model
platform string Yes Platform
system_version string Yes System version
api_id int Yes API ID
app_name string Yes App name
app_version string Yes App version
date_created int Yes When was the session created
date_active int Yes When was the session last active
ip string Yes Last known IP
country string Yes Country determined from IP
region string Yes Region determined from IP

Type: Authorization

Example:

$authorization = ['_' => 'authorization', 'current' => Bool, 'official_app' => Bool, 'password_pending' => 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'];

Or, if you're into Lua:

authorization={_='authorization', current=Bool, official_app=Bool, password_pending=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'}