MadelineProtoDocs/old_docs/API_docs_v95/constructors/codeSettings.md

46 lines
1.7 KiB
Markdown
Raw Normal View History

2019-03-29 21:12:30 +01:00
---
title: codeSettings
2019-12-27 17:48:04 +01:00
description: Settings used by telegram servers for sending the confirm code.
Example implementations: [telegram for android](https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java), [tdlib](https://github.com/tdlib/td/tree/master/td/telegram/SendCodeHelper.cpp).
2019-03-29 21:12:30 +01:00
image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
---
# Constructor: codeSettings
[Back to constructors index](index.md)
2019-12-27 17:48:04 +01:00
Settings used by telegram servers for sending the confirm code.
Example implementations: [telegram for android](https://github.com/DrKLO/Telegram/blob/master/TMessagesProj/src/main/java/org/telegram/ui/LoginActivity.java), [tdlib](https://github.com/tdlib/td/tree/master/td/telegram/SendCodeHelper.cpp).
2019-03-29 21:12:30 +01:00
### Attributes:
| Name | Type | Required | Description |
|----------|---------------|----------|-------------|
2019-12-27 17:48:04 +01:00
|allow\_flashcall|[Bool](../types/Bool.md) | Optional|Whether to allow phone verification via [phone calls](https://core.telegram.org/api/auth).|
|current\_number|[Bool](../types/Bool.md) | Optional|Pass true if the phone number is used on the current device. Ignored if allow\_flashcall is not set.|
2019-03-29 21:12:30 +01:00
|app\_hash\_persistent|[Bool](../types/Bool.md) | Optional|Persistent hash?|
|app\_hash|[string](../types/string.md) | Optional|Hash type|
### Type: [CodeSettings](../types/CodeSettings.md)
### Example:
```php
$codeSettings = ['_' => 'codeSettings', 'allow_flashcall' => Bool, 'current_number' => Bool, 'app_hash_persistent' => Bool, 'app_hash' => 'string'];
```
Or, if you're into Lua:
```lua
codeSettings={_='codeSettings', allow_flashcall=Bool, current_number=Bool, app_hash_persistent=Bool, app_hash='string'}
```