MadelineProto/docs/API_docs/constructors/authorization.md

54 lines
1.7 KiB
Markdown
Raw Normal View History

2016-12-20 13:15:22 +01:00
---
title: authorization
2016-12-20 13:32:11 +01:00
description: authorization attributes, type and example
2016-12-20 13:15:22 +01:00
---
## Constructor: authorization
2016-12-20 13:15:22 +01:00
[Back to constructors index](index.md)
### Attributes:
| Name | Type | Required |
|----------|:-------------:|---------:|
|hash|[long](../types/long.md) | Yes|
|device\_model|[string](../types/string.md) | Yes|
|platform|[string](../types/string.md) | Yes|
|system\_version|[string](../types/string.md) | Yes|
|api\_id|[int](../types/int.md) | Yes|
|app\_name|[string](../types/string.md) | Yes|
|app\_version|[string](../types/string.md) | Yes|
|date\_created|[int](../types/int.md) | Yes|
|date\_active|[int](../types/int.md) | Yes|
|ip|[string](../types/string.md) | Yes|
|country|[string](../types/string.md) | Yes|
|region|[string](../types/string.md) | Yes|
2016-12-19 18:56:05 +01:00
### Type: [Authorization](../types/Authorization.md)
### Example:
```
2016-12-30 21:21:36 +01:00
$authorization = ['_' => 'authorization', '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, ];
```
2017-07-23 16:11:02 +02:00
[PWRTelegram](https://pwrtelegram.xyz) json-encoded version:
```
{"_":"authorization","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', 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, }
```