Skip to main content

authorization

Logged-in session

type tg.Authorization struct { /* ... */ }

Fields

NameTypeRequiredDescription
CurrentboolWhether this is the current session
OfficialAppboolWhether the session is from an official app
PasswordPendingboolWhether the session is still waiting for a 2FA password
EncryptedRequestsDisabledboolWhether this session will accept encrypted chats
CallRequestsDisabledboolWhether this session will accept phone calls
UnconfirmedboolWhether the session is unconfirmed, see here » for more info.
Hashint64yesIdentifier
DeviceModelstringyesDevice model
PlatformstringyesPlatform
SystemVersionstringyesSystem version
APIIDintyesAPI ID
AppNamestringyesApp name
AppVersionstringyesApp version
DateCreatedintyesWhen was the session created
DateActiveintyesWhen was the session last active
IPstringyesLast known IP
CountrystringyesCountry determined from IP
RegionstringyesRegion determined from IP

Returned by

References