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

1.7 KiB

title description image
webAuthorization Represents a bot logged in using the [Telegram login widget](https://core.telegram.org/widgets/login) https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png

Constructor: webAuthorization

Back to constructors index

Represents a bot logged in using the Telegram login widget

Attributes:

Name Type Required Description
hash long Yes Authorization hash
bot_id int Yes Bot ID
domain string Yes The domain name of the website on which the user has logged in.
browser string Yes Browser user-agent
platform string Yes Platform
date_created int Yes When was the web session created
date_active int Yes When was the web session last active
ip string Yes IP address
region string Yes Region, determined from IP address

Type: WebAuthorization

Example:

$webAuthorization = ['_' => 'webAuthorization', 'hash' => long, 'bot_id' => int, 'domain' => 'string', 'browser' => 'string', 'platform' => 'string', 'date_created' => int, 'date_active' => int, 'ip' => 'string', 'region' => 'string'];

Or, if you're into Lua:

webAuthorization={_='webAuthorization', hash=long, bot_id=int, domain='string', browser='string', platform='string', date_created=int, date_active=int, ip='string', region='string'}