Update docs

This commit is contained in:
Daniil Gentili 2019-09-02 17:41:28 +02:00
parent 11f1a298b7
commit c60f59ffe2
5619 changed files with 72406 additions and 42412 deletions

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
User = account.changePhone({phone_number='string', phone_code_hash='string', phone_code='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = account.checkUsername({username='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|USERNAME_INVALID|The provided username is not valid|
| Code | Type | Description |
|------|----------|---------------|
|400|USERNAME_INVALID|The provided username is not valid|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Bool = account.confirmPhone({phone_code_hash='string', phone_code='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CODE_HASH_INVALID|Code hash invalid|
|PHONE_CODE_EMPTY|phone_code is missing|
| Code | Type | Description |
|------|----------|---------------|
|400|CODE_HASH_INVALID|Code hash invalid|
|400|PHONE_CODE_EMPTY|phone_code is missing|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
PeerNotifySettings = account.getNotifySettings({peer=InputNotifyPeer, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -7,8 +7,45 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)**
Get the current 2FA settings
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|password|[InputCheckPasswordSRP](../types/InputCheckPasswordSRP.md) | You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [account\_PasswordSettings](../types/account_PasswordSettings.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$account_PasswordSettings = $MadelineProto->account->getPasswordSettings(['password' => InputCheckPasswordSRP, ]);
```
Or, if you're into Lua:
```lua
account_PasswordSettings = account.getPasswordSettings({password=InputCheckPasswordSRP, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|PASSWORD_HASH_INVALID|The provided password hash is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
account_PrivacyRules = account.getPrivacy({key=InputPrivacyKey, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PRIVACY_KEY_INVALID|The privacy key is invalid|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
account_TmpPassword = account.getTmpPassword({password=InputCheckPasswordSRP, period=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|TMP_PASSWORD_DISABLED|The temporary password is disabled|
| Code | Type | Description |
|------|----------|---------------|
|400|PASSWORD_HASH_INVALID|The provided password hash is invalid|
|400|TMP_PASSWORD_DISABLED|The temporary password is disabled|

View File

@ -47,10 +47,10 @@ Or, if you're into Lua:
Bool = account.registerDevice({no_muted=Bool, token_type=int, token='string', app_sandbox=Bool, secret='bytes', other_uids={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|TOKEN_INVALID|The provided token is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|TOKEN_INVALID|The provided token is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = account.reportPeer({peer=InputPeer, reason=ReportReason, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = account.resetAuthorization({hash=long, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|HASH_INVALID|The provided hash is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|HASH_INVALID|The provided hash is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
auth_SentCode = account.sendChangePhoneCode({phone_number='string', settings=CodeSettings, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
auth_SentCode = account.sendConfirmPhoneCode({hash='string', settings=CodeSettings, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|HASH_INVALID|The provided hash is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|HASH_INVALID|The provided hash is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = account.setAccountTTL({ttl=AccountDaysTTL, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|TTL_DAYS_INVALID|The provided TTL is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|TTL_DAYS_INVALID|The provided TTL is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
account_PrivacyRules = account.setPrivacy({key=InputPrivacyKey, rules={InputPrivacyRule}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PRIVACY_KEY_INVALID|The privacy key is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PRIVACY_KEY_INVALID|The privacy key is invalid|

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
Bool = account.unregisterDevice({token_type=int, token='string', other_uids={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|TOKEN_INVALID|The provided token is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|TOKEN_INVALID|The provided token is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = account.updateNotifySettings({peer=InputNotifyPeer, settings=InputPeerNotifySettings, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -7,8 +7,50 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|password|[InputCheckPasswordSRP](../types/InputCheckPasswordSRP.md) | You cannot use this method directly; use $MadelineProto->update_2fa($params), instead (see https://docs.madelineproto.xyz for more info) | Yes|
|new\_settings|[account\_PasswordInputSettings](../types/account_PasswordInputSettings.md) | New 2FA settings | Yes|
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->account->updatePasswordSettings(['password' => InputCheckPasswordSRP, 'new_settings' => account_PasswordInputSettings, ]);
```
Or, if you're into Lua:
```lua
Bool = account.updatePasswordSettings({password=InputCheckPasswordSRP, new_settings=account_PasswordInputSettings, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|EMAIL_UNCONFIRMED|Email unconfirmed|
|400|EMAIL_UNCONFIRMED_X|The provided email isn't confirmed, X is the length of the verification code that was just sent to the email.|
|400|NEW_SALT_INVALID|The new salt is invalid|
|400|NEW_SETTINGS_INVALID|The new settings are invalid|
|400|PASSWORD_HASH_INVALID|The provided password hash is invalid|

View File

@ -44,11 +44,11 @@ Or, if you're into Lua:
User = account.updateProfile({first_name='string', last_name='string', about='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|ABOUT_TOO_LONG|About string too long|
|FIRSTNAME_INVALID|The first name is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|ABOUT_TOO_LONG|About string too long|
|400|FIRSTNAME_INVALID|The first name is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = account.updateStatus({offline=Bool, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
| Code | Type | Description |
|------|----------|---------------|
|401|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|

View File

@ -42,13 +42,13 @@ Or, if you're into Lua:
User = account.updateUsername({username='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|USERNAME_INVALID|The provided username is not valid|
|USERNAME_NOT_MODIFIED|The username was not modified|
|USERNAME_OCCUPIED|The provided username is already occupied|
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
| Code | Type | Description |
|------|----------|---------------|
|400|USERNAME_INVALID|The provided username is not valid|
|400|USERNAME_NOT_MODIFIED|The username was not modified|
|400|USERNAME_OCCUPIED|The provided username is already occupied|
|401|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|

View File

@ -7,8 +7,51 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info**
You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|perm\_auth\_key\_id|[long](../types/long.md) | You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info | Yes|
|nonce|[long](../types/long.md) | You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info | Yes|
|expires\_at|[int](../types/int.md) | You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info | Yes|
|encrypted\_message|[bytes](../types/bytes.md) | You cannot use this method directly, instead modify the PFS and default_temp_auth_key_expires_in settings, see https://docs.madelineproto.xyz/docs/SETTINGS.html for more info | Yes|
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->auth->bindTempAuthKey(['perm_auth_key_id' => long, 'nonce' => long, 'expires_at' => int, 'encrypted_message' => 'bytes', ]);
```
Or, if you're into Lua:
```lua
Bool = auth.bindTempAuthKey({perm_auth_key_id=long, nonce=long, expires_at=int, encrypted_message='bytes', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|ENCRYPTED_MESSAGE_INVALID|Encrypted message invalid|
|400|INPUT_REQUEST_TOO_LONG|The request is too big|
|400|TEMP_AUTH_KEY_EMPTY|No temporary auth key provided|
|-503|Timeout|Timeout while fetching data|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = auth.cancelCode({phone_number='string', phone_code_hash='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|

View File

@ -7,8 +7,45 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|password|[InputCheckPasswordSRP](../types/InputCheckPasswordSRP.md) | You cannot use this method directly, use the complete_2fa_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_Authorization = $MadelineProto->auth->checkPassword(['password' => InputCheckPasswordSRP, ]);
```
Or, if you're into Lua:
```lua
auth_Authorization = auth.checkPassword({password=InputCheckPasswordSRP, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|PASSWORD_HASH_INVALID|The provided password hash is invalid|

View File

@ -7,8 +7,45 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html**
You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|dc\_id|[int](../types/int.md) | You cannot use this method directly, use $MadelineProto->export_authorization() instead, see https://docs.madelineproto.xyz/docs/LOGIN.html | Yes|
### Return type: [auth\_ExportedAuthorization](../types/auth_ExportedAuthorization.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_ExportedAuthorization = $MadelineProto->auth->exportAuthorization(['dc_id' => int, ]);
```
Or, if you're into Lua:
```lua
auth_ExportedAuthorization = auth.exportAuthorization({dc_id=int, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|DC_ID_INVALID|The provided DC ID is invalid|

View File

@ -7,8 +7,47 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html**
You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|id|[int](../types/int.md) | You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html | Yes|
|bytes|[bytes](../types/bytes.md) | You cannot use this method directly, use $MadelineProto->import_authorization($authorization) instead, see https://docs.madelineproto.xyz/docs/LOGIN.html | Yes|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_Authorization = $MadelineProto->auth->importAuthorization(['id' => int, 'bytes' => 'bytes', ]);
```
Or, if you're into Lua:
```lua
auth_Authorization = auth.importAuthorization({id=int, bytes='bytes', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|AUTH_BYTES_INVALID|The provided authorization is invalid|
|400|USER_ID_INVALID|The provided user ID is invalid|

View File

@ -7,8 +7,49 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|api\_id|[int](../types/int.md) | You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|api\_hash|[string](../types/string.md) | You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|bot\_auth\_token|[string](../types/string.md) | You cannot use this method directly, use the bot_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_Authorization = $MadelineProto->auth->importBotAuthorization(['api_id' => int, 'api_hash' => 'string', 'bot_auth_token' => 'string', ]);
```
Or, if you're into Lua:
```lua
auth_Authorization = auth.importBotAuthorization({api_id=int, api_hash='string', bot_auth_token='string', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|ACCESS_TOKEN_EXPIRED|Access token expired|
|400|ACCESS_TOKEN_INVALID|Access token invalid|
|400|API_ID_INVALID|API ID invalid|

View File

@ -7,8 +7,33 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the logout method instead (see https://docs.madelineproto.xyz for more info)
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->auth->logOut();
```
Or, if you're into Lua:
```lua
Bool = auth.logOut({})
```

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
auth_Authorization = auth.recoverPassword({code='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CODE_EMPTY|The provided code is empty|
| Code | Type | Description |
|------|----------|---------------|
|400|CODE_EMPTY|The provided code is empty|

View File

@ -37,10 +37,10 @@ Or, if you're into Lua:
auth_PasswordRecovery = auth.requestPasswordRecovery({})
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PASSWORD_EMPTY|The provided password is empty|
| Code | Type | Description |
|------|----------|---------------|
|400|PASSWORD_EMPTY|The provided password is empty|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
auth_SentCode = auth.resendCode({phone_number='string', phone_code_hash='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PHONE_NUMBER_INVALID|The phone number is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|

View File

@ -37,10 +37,10 @@ Or, if you're into Lua:
Bool = auth.resetAuthorizations({})
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|-503|Timeout|Timeout while fetching data|

View File

@ -7,8 +7,58 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info)**
Use phone_login instead
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|phone\_number|[string](../types/string.md) | Use phone_login instead | Yes|
|api\_id|[int](../types/int.md) | Use phone_login instead | Yes|
|api\_hash|[string](../types/string.md) | Use phone_login instead | Yes|
|settings|[CodeSettings](../types/CodeSettings.md) | You cannot use this method directly, use the phone_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [auth\_SentCode](../types/auth_SentCode.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_SentCode = $MadelineProto->auth->sendCode(['phone_number' => 'string', 'api_id' => int, 'api_hash' => 'string', 'settings' => CodeSettings, ]);
```
Or, if you're into Lua:
```lua
auth_SentCode = auth.sendCode({phone_number='string', api_id=int, api_hash='string', settings=CodeSettings, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|API_ID_INVALID|API ID invalid|
|400|API_ID_PUBLISHED_FLOOD|This API id was published somewhere, you can't use it now|
|400|INPUT_REQUEST_TOO_LONG|The request is too big|
|400|PHONE_NUMBER_APP_SIGNUP_FORBIDDEN|You can't sign up using this app|
|400|PHONE_NUMBER_BANNED|The provided phone number is banned from telegram|
|400|PHONE_NUMBER_FLOOD|You asked for the code too many times.|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|
|400|PHONE_PASSWORD_PROTECTED|This phone is password protected|
|400|SMS_CODE_CREATE_FAILED|An error occurred while creating the SMS code|
|406|PHONE_NUMBER_INVALID|The phone number is invalid|
|406|PHONE_PASSWORD_FLOOD|You have tried logging in too many times|

View File

@ -7,8 +7,52 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|phone\_number|[string](../types/string.md) | You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|phone\_code\_hash|[string](../types/string.md) | You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|phone\_code|[string](../types/string.md) | You cannot use this method directly, use the complete_phone_login method instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_Authorization = $MadelineProto->auth->signIn(['phone_number' => 'string', 'phone_code_hash' => 'string', 'phone_code' => 'string', ]);
```
Or, if you're into Lua:
```lua
auth_Authorization = auth.signIn({phone_number='string', phone_code_hash='string', phone_code='string', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|PHONE_CODE_EMPTY|phone_code is missing|
|400|PHONE_CODE_EXPIRED|The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)|
|400|PHONE_CODE_INVALID|The provided phone code is invalid|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|
|400|PHONE_NUMBER_UNOCCUPIED|The phone number is not yet being used|
|401|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|

View File

@ -7,8 +7,54 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|phone\_number|[string](../types/string.md) | You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|phone\_code\_hash|[string](../types/string.md) | You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|first\_name|[string](../types/string.md) | You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info) | Yes|
|last\_name|[string](../types/string.md) | You cannot use this method directly, use the complete_signup method instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [auth\_Authorization](../types/auth_Authorization.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$auth_Authorization = $MadelineProto->auth->signUp(['phone_number' => 'string', 'phone_code_hash' => 'string', 'first_name' => 'string', 'last_name' => 'string', ]);
```
Or, if you're into Lua:
```lua
auth_Authorization = auth.signUp({phone_number='string', phone_code_hash='string', first_name='string', last_name='string', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|FIRSTNAME_INVALID|The first name is invalid|
|400|PHONE_CODE_EMPTY|phone_code is missing|
|400|PHONE_CODE_EXPIRED|The phone code you provided has expired, this may happen if it was sent to any chat on telegram (if the code is sent through a telegram chat (not the official account) to avoid it append or prepend to the code some chars)|
|400|PHONE_CODE_INVALID|The provided phone code is invalid|
|400|PHONE_NUMBER_FLOOD|You asked for the code too many times.|
|400|PHONE_NUMBER_INVALID|The phone number is invalid|
|400|PHONE_NUMBER_OCCUPIED|The phone number is already in use|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Bool = bots.answerWebhookJSONQuery({query_id=long, data=DataJSON, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|QUERY_ID_INVALID|The query ID is invalid|
|USER_BOT_INVALID|This method can only be called by a bot|
| Code | Type | Description |
|------|----------|---------------|
|400|QUERY_ID_INVALID|The query ID is invalid|
|400|USER_BOT_INVALID|This method can only be called by a bot|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
DataJSON = bots.sendCustomRequest({custom_method='string', params=DataJSON, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|USER_BOT_INVALID|This method can only be called by a bot|
| Code | Type | Description |
|------|----------|---------------|
|400|USER_BOT_INVALID|This method can only be called by a bot|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
Bool = channels.checkUsername({channel=InputChannel, username='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHAT_ID_INVALID|The provided chat id is invalid|
|USERNAME_INVALID|The provided username is not valid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|USERNAME_INVALID|The provided username is not valid|

View File

@ -47,12 +47,12 @@ Or, if you're into Lua:
Updates = channels.createChannel({broadcast=Bool, megagroup=Bool, title='string', about='string', geo_point=InputGeoPoint, address='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_TITLE_EMPTY|No chat title provided|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_TITLE_EMPTY|No chat title provided|
|406|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
|403|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|

View File

@ -42,11 +42,11 @@ Or, if you're into Lua:
Updates = channels.deleteChannel({channel=InputChannel, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
messages_AffectedMessages = channels.deleteMessages({channel=InputChannel, id={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|403|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
messages_AffectedHistory = channels.deleteUserHistory({channel=InputChannel, user_id=InputUser, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|

View File

@ -45,19 +45,19 @@ Or, if you're into Lua:
Updates = channels.editAdmin({channel=InputChannel, user_id=InputUser, admin_rights=ChatAdminRights, rank='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|ADMINS_TOO_MUCH|There are too many admins|
|BOT_CHANNELS_NA|Bots can't edit admin privileges|
|CHANNEL_INVALID|The provided channel is invalid|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|USER_CREATOR|You can't leave this channel, because you're its creator|
|USER_ID_INVALID|The provided user ID is invalid|
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this|
|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this|
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
| Code | Type | Description |
|------|----------|---------------|
|400|ADMINS_TOO_MUCH|There are too many admins|
|400|BOT_CHANNELS_NA|Bots can't edit admin privileges|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|USER_CREATOR|You can't leave this channel, because you're its creator|
|400|USER_ID_INVALID|The provided user ID is invalid|
|400|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|403|CHAT_ADMIN_INVITE_REQUIRED|You do not have the rights to do this|
|403|RIGHT_FORBIDDEN|Your admin rights do not allow you to do this|
|403|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|

View File

@ -44,14 +44,14 @@ Or, if you're into Lua:
Updates = channels.editBanned({channel=InputChannel, user_id=InputUser, banned_rights=ChatBannedRights, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|USER_ADMIN_INVALID|You're not an admin|
|USER_ID_INVALID|The provided user ID is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|USER_ADMIN_INVALID|You're not an admin|
|400|USER_ID_INVALID|The provided user ID is invalid|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
Updates = channels.editPhoto({channel=InputChannel, photo=InputChatPhoto, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|PHOTO_INVALID|Photo invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|PHOTO_INVALID|Photo invalid|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
Updates = channels.editTitle({channel=InputChannel, title='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|CHAT_NOT_MODIFIED|The pinned message wasn't modified|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|CHAT_NOT_MODIFIED|The pinned message wasn't modified|

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
ExportedMessageLink = channels.exportMessageLink({channel=InputChannel, id=int, grouped=Bool, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|

View File

@ -48,12 +48,12 @@ Or, if you're into Lua:
channels_AdminLogResults = channels.getAdminLog({channel=InputChannel, q='string', events_filter=ChannelAdminLogEventsFilter, admins={InputUser}, max_id=long, min_id=long, limit=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|

View File

@ -42,11 +42,11 @@ Or, if you're into Lua:
messages_Chats = channels.getChannels({id={InputChannel}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|

View File

@ -7,8 +7,48 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|channel|[Username, chat ID, Update, Message or InputChannel](../types/InputChannel.md) | You cannot use this method directly, use the get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info) | Optional|
### Return type: [messages\_ChatFull](../types/messages_ChatFull.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$messages_ChatFull = $MadelineProto->channels->getFullChannel(['channel' => InputChannel, ]);
```
Or, if you're into Lua:
```lua
messages_ChatFull = channels.getFullChannel({channel=InputChannel, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|403|CHANNEL_PUBLIC_GROUP_NA|channel/supergroup not available|
|-503|Timeout|Timeout while fetching data|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
messages_Chats = channels.getLeftChannels({offset=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|TAKEOUT_REQUIRED|A takeout session has to be initialized, first|
| Code | Type | Description |
|------|----------|---------------|
|403|TAKEOUT_REQUIRED|A takeout session has to be initialized, first|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
messages_Messages = channels.getMessages({channel=InputChannel, id={InputMessage}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|MESSAGE_IDS_EMPTY|No message ids were provided|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|MESSAGE_IDS_EMPTY|No message ids were provided|

View File

@ -43,14 +43,14 @@ Or, if you're into Lua:
channels_ChannelParticipant = channels.getParticipant({channel=InputChannel, user_id=InputUser, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|USER_ID_INVALID|The provided user ID is invalid|
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|USER_ID_INVALID|The provided user ID is invalid|
|400|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|

View File

@ -46,14 +46,14 @@ Or, if you're into Lua:
channels_ChannelParticipants = channels.getParticipants({channel=InputChannel, filter=ChannelParticipantsFilter, offset=int, limit=int, hash={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|-503|Timeout|Timeout while fetching data|

View File

@ -43,25 +43,25 @@ Or, if you're into Lua:
Updates = channels.inviteToChannel({channel=InputChannel, users={InputUser}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|BOT_GROUPS_BLOCKED|This bot can't be added to groups|
|BOTS_TOO_MUCH|There are too many bots in this chat/channel|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|USER_BLOCKED|User blocked|
|USER_BOT|Bots can only be admins in channels.|
|USER_ID_INVALID|The provided user ID is invalid|
|USER_KICKED|This user was kicked from this supergroup/channel|
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups|
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
| Code | Type | Description |
|------|----------|---------------|
|400|BOT_GROUPS_BLOCKED|This bot can't be added to groups|
|400|BOTS_TOO_MUCH|There are too many bots in this chat/channel|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|INPUT_USER_DEACTIVATED|The specified user was deleted|
|400|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|400|USER_BLOCKED|User blocked|
|400|USER_BOT|Bots can only be admins in channels.|
|400|USER_ID_INVALID|The provided user ID is invalid|
|400|USER_KICKED|This user was kicked from this supergroup/channel|
|400|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|400|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|403|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|403|USER_CHANNELS_TOO_MUCH|One of the users you tried to add is already in too many channels/supergroups|
|403|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|

View File

@ -42,15 +42,15 @@ Or, if you're into Lua:
Updates = channels.joinChannel({channel=InputChannel, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups|
|INVITE_HASH_EXPIRED|The invite link has expired|
|INVITE_HASH_INVALID|The invite hash is invalid|
|USER_ALREADY_PARTICIPANT|The user is already in the group|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHANNELS_TOO_MUCH|You have joined too many channels/supergroups|
|400|INVITE_HASH_EXPIRED|The invite link has expired|
|400|INVITE_HASH_INVALID|The invite hash is invalid|
|400|USER_ALREADY_PARTICIPANT|The user is already in the group|

View File

@ -42,14 +42,14 @@ Or, if you're into Lua:
Updates = channels.leaveChannel({channel=InputChannel, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|USER_CREATOR|You can't leave this channel, because you're its creator|
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|CHANNEL_PUBLIC_GROUP_NA|channel/supergroup not available|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|USER_CREATOR|You can't leave this channel, because you're its creator|
|400|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
|403|CHANNEL_PUBLIC_GROUP_NA|channel/supergroup not available|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Bool = channels.readHistory({channel=InputChannel, max_id=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Bool = channels.readMessageContents({channel=InputChannel, id={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|

View File

@ -44,11 +44,11 @@ Or, if you're into Lua:
Bool = channels.reportSpam({channel=InputChannel, user_id=InputUser, id={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|INPUT_USER_DEACTIVATED|The specified user was deleted|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Bool = channels.setStickers({channel=InputChannel, stickerset=InputStickerSet, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|PARTICIPANTS_TOO_FEW|Not enough participants|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|PARTICIPANTS_TOO_FEW|Not enough participants|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Updates = channels.toggleSignatures({channel=InputChannel, enabled=Bool, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|

View File

@ -43,14 +43,14 @@ Or, if you're into Lua:
Bool = channels.updateUsername({channel=InputChannel, username='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNELS_ADMIN_PUBLIC_TOO_MUCH|You're admin of too many public channels, make some channels private to change the username of this channel|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|USERNAME_INVALID|The provided username is not valid|
|USERNAME_OCCUPIED|The provided username is already occupied|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNELS_ADMIN_PUBLIC_TOO_MUCH|You're admin of too many public channels, make some channels private to change the username of this channel|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|USERNAME_INVALID|The provided username is not valid|
|400|USERNAME_OCCUPIED|The provided username is already occupied|

View File

@ -46,10 +46,10 @@ Or, if you're into Lua:
Updates = contacts.addContact({add_phone_privacy_exception=Bool, id=InputUser, first_name='string', last_name='string', phone='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CONTACT_ID_INVALID|The provided contact ID is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = contacts.block({id=InputUser, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CONTACT_ID_INVALID|The provided contact ID is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Updates = contacts.deleteContacts({id={InputUser}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|-503|Timeout|Timeout while fetching data|

View File

@ -37,10 +37,10 @@ Or, if you're into Lua:
Vector_of_ContactStatus = contacts.getStatuses({})
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|
| Code | Type | Description |
|------|----------|---------------|
|401|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|

View File

@ -52,10 +52,10 @@ Or, if you're into Lua:
contacts_TopPeers = contacts.getTopPeers({correspondents=Bool, bots_pm=Bool, bots_inline=Bool, phone_calls=Bool, forward_users=Bool, forward_chats=Bool, groups=Bool, channels=Bool, offset=int, limit=int, hash={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|TYPES_EMPTY|No top peer type was provided|
| Code | Type | Description |
|------|----------|---------------|
|400|TYPES_EMPTY|No top peer type was provided|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = contacts.resetTopPeerRating({category=TopPeerCategory, peer=InputPeer, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -7,8 +7,48 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)**
You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info)
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|username|[string](../types/string.md) | You cannot use this method directly, use the resolve_username, get_pwr_chat, get_info, get_full_info methods instead (see https://docs.madelineproto.xyz for more info) | Yes|
### Return type: [contacts\_ResolvedPeer](../types/contacts_ResolvedPeer.md)
### Can bots use this method: **YES**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$contacts_ResolvedPeer = $MadelineProto->contacts->resolveUsername(['username' => 'string', ]);
```
Or, if you're into Lua:
```lua
contacts_ResolvedPeer = contacts.resolveUsername({username='string', })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|USERNAME_INVALID|The provided username is not valid|
|400|USERNAME_NOT_OCCUPIED|The provided username is not occupied|
|401|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.|
|401|SESSION_PASSWORD_NEEDED|2FA is enabled, use a password to login|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
contacts_Found = contacts.search({q='string', limit=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|QUERY_TOO_SHORT|The query string is too short|
|SEARCH_QUERY_EMPTY|The search query is empty|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|QUERY_TOO_SHORT|The query string is too short|
|400|SEARCH_QUERY_EMPTY|The search query is empty|
|-503|Timeout|Timeout while fetching data|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Bool = contacts.unblock({id=InputUser, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CONTACT_ID_INVALID|The provided contact ID is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CONTACT_ID_INVALID|The provided contact ID is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Updates = folders.editPeerFolders({folder_peers={InputFolderPeer}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|FOLDER_ID_INVALID|Invalid folder ID|
| Code | Type | Description |
|------|----------|---------------|
|400|FOLDER_ID_INVALID|Invalid folder ID|

View File

@ -37,12 +37,12 @@ Or, if you're into Lua:
CdnConfig = help.getCdnConfig({})
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|406|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|401|AUTH_KEY_PERM_EMPTY|The temporary auth key must be binded to the permanent auth key to use these methods.|
|-503|Timeout|Timeout while fetching data|

View File

@ -37,12 +37,12 @@ Or, if you're into Lua:
Config = help.getConfig({})
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|406|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|-503|Timeout|Timeout while fetching data|

View File

@ -30,549 +30,3 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
* [Create a secret chat bot](https://docs.madelineproto.xyz/docs/SECRET_CHATS.html)
* <a href="messages_acceptUrlAuth.html" name="messages_acceptUrlAuth">Accept URL authorization: messages.acceptUrlAuth</a>
* <a href="contacts_acceptContact.html" name="contacts_acceptContact">Accept contact: contacts.acceptContact</a>
* <a href="account_acceptAuthorization.html" name="account_acceptAuthorization">Accept telegram passport authorization: account.acceptAuthorization</a>
* <a href="help_acceptTermsOfService.html" name="help_acceptTermsOfService">Accept telegram's TOS: help.acceptTermsOfService</a>
* <a href="messages_installStickerSet.html" name="messages_installStickerSet">Add a sticker set: messages.installStickerSet</a>
* <a href="messages_faveSticker.html" name="messages_faveSticker">Add a sticker to favorites: messages.faveSticker</a>
* <a href="messages_saveRecentSticker.html" name="messages_saveRecentSticker">Add a sticker to recent stickers: messages.saveRecentSticker</a>
* <a href="messages_addChatUser.html" name="messages_addChatUser">Add a user to a normal chat (use channels->inviteToChannel for supergroups): messages.addChatUser</a>
* <a href="contacts_addContact.html" name="contacts_addContact">Add contact: contacts.addContact</a>
* <a href="contacts_importContacts.html" name="contacts_importContacts">Add phone number as contact: contacts.importContacts</a>
* <a href="stickers_addStickerToSet.html" name="stickers_addStickerToSet">Add sticker to stickerset: stickers.addStickerToSet</a>
* <a href="channels_inviteToChannel.html" name="channels_inviteToChannel">Add users to channel/supergroup: channels.inviteToChannel</a>
* <a href="contacts_block.html" name="contacts_block">Block a user: contacts.block</a>
* <a href="account_getAuthorizationForm.html" name="account_getAuthorizationForm">Bots only: get telegram passport authorization form: account.getAuthorizationForm</a>
* <a href="payments_sendPaymentForm.html" name="payments_sendPaymentForm">Bots only: send payment form: payments.sendPaymentForm</a>
* <a href="messages_setBotPrecheckoutResults.html" name="messages_setBotPrecheckoutResults">Bots only: set precheckout results: messages.setBotPrecheckoutResults</a>
* <a href="messages_setBotShippingResults.html" name="messages_setBotShippingResults">Bots only: set shipping results: messages.setBotShippingResults</a>
* <a href="messages_setBotCallbackAnswer.html" name="messages_setBotCallbackAnswer">Bots only: set the callback answer (after a button was clicked): messages.setBotCallbackAnswer</a>
* <a href="messages_setInlineBotResults.html" name="messages_setInlineBotResults">Bots only: set the results of an inline query: messages.setInlineBotResults</a>
* <a href="messages_getInlineBotResults.html" name="messages_getInlineBotResults">Call inline bot: messages.getInlineBotResults</a>
* <a href="account_cancelPasswordEmail.html" name="account_cancelPasswordEmail">Cancel password recovery email: account.cancelPasswordEmail</a>
* <a href="account_updateNotifySettings.html" name="account_updateNotifySettings">Change notification settings: account.updateNotifySettings</a>
* <a href="stickers_changeStickerPosition.html" name="stickers_changeStickerPosition">Change sticker position in photo: stickers.changeStickerPosition</a>
* <a href="account_changePhone.html" name="account_changePhone">Change the phone number associated to this account: account.changePhone</a>
* <a href="account_sendChangePhoneCode.html" name="account_sendChangePhoneCode">Change the phone number: account.sendChangePhoneCode</a>
* <a href="photos_updateProfilePhoto.html" name="photos_updateProfilePhoto">Change the profile photo: photos.updateProfilePhoto</a>
* <a href="messages_setTyping.html" name="messages_setTyping">Change typing status: messages.setTyping</a>
* <a href="messages_getMessageEditData.html" name="messages_getMessageEditData">Check if about to edit a message or a media caption: messages.getMessageEditData</a>
* <a href="messages_checkChatInvite.html" name="messages_checkChatInvite">Check if an invitation link is valid: messages.checkChatInvite</a>
* <a href="account_checkUsername.html" name="account_checkUsername">Check if this username is available: account.checkUsername</a>
* <a href="channels_checkUsername.html" name="channels_checkUsername">Check if this username is free and can be assigned to a channel/supergroup: channels.checkUsername</a>
* <a href="messages_clearAllDrafts.html" name="messages_clearAllDrafts">Clear all drafts: messages.clearAllDrafts</a>
* <a href="messages_clearRecentStickers.html" name="messages_clearRecentStickers">Clear all recent stickers: messages.clearRecentStickers</a>
* <a href="payments_clearSavedInfo.html" name="payments_clearSavedInfo">Clear saved payments info: payments.clearSavedInfo</a>
* <a href="account_confirmPasswordEmail.html" name="account_confirmPasswordEmail">Confirm password recovery using email: account.confirmPasswordEmail</a>
* <a href="account_confirmPhone.html" name="account_confirmPhone">Confirm this phone number is associated to this account, obtain phone_code_hash from sendConfirmPhoneCode: account.confirmPhone</a>
* <a href="account_getContactSignUpNotification.html" name="account_getContactSignUpNotification">Contact signup notification setting value: account.getContactSignUpNotification</a>
* <a href="messages_migrateChat.html" name="messages_migrateChat">Convert chat to supergroup: messages.migrateChat</a>
* <a href="messages_createChat.html" name="messages_createChat">Create a chat (not supergroup): messages.createChat</a>
* <a href="channels_createChannel.html" name="channels_createChannel">Create channel/supergroup: channels.createChannel</a>
* <a href="stickers_createStickerSet.html" name="stickers_createStickerSet">Create stickerset: stickers.createStickerSet</a>
* <a href="account_resetAuthorization.html" name="account_resetAuthorization">Delete a certain session: account.resetAuthorization</a>
* <a href="account_resetWebAuthorization.html" name="account_resetWebAuthorization">Delete a certain telegram web login authorization: account.resetWebAuthorization</a>
* <a href="channels_deleteChannel.html" name="channels_deleteChannel">Delete a channel/supergroup: channels.deleteChannel</a>
* <a href="messages_deleteChatUser.html" name="messages_deleteChatUser">Delete a user from a chat (not supergroup): messages.deleteChatUser</a>
* <a href="auth_resetAuthorizations.html" name="auth_resetAuthorizations">Delete all logged-in sessions.: auth.resetAuthorizations</a>
* <a href="channels_deleteUserHistory.html" name="channels_deleteUserHistory">Delete all messages of a user in a channel/supergroup: channels.deleteUserHistory</a>
* <a href="auth_dropTempAuthKeys.html" name="auth_dropTempAuthKeys">Delete all temporary authorization keys except the ones provided: auth.dropTempAuthKeys</a>
* <a href="channels_deleteMessages.html" name="channels_deleteMessages">Delete channel/supergroup messages: channels.deleteMessages</a>
* <a href="messages_deleteHistory.html" name="messages_deleteHistory">Delete chat history: messages.deleteHistory</a>
* <a href="contacts_deleteByPhones.html" name="contacts_deleteByPhones">Delete contacts by phones: contacts.deleteByPhones</a>
* <a href="folders_deleteFolder.html" name="folders_deleteFolder">Delete folder: folders.deleteFolder</a>
* <a href="messages_deleteMessages.html" name="messages_deleteMessages">Delete messages: messages.deleteMessages</a>
* <a href="contacts_deleteContacts.html" name="contacts_deleteContacts">Delete multiple contacts: contacts.deleteContacts</a>
* <a href="photos_deletePhotos.html" name="photos_deletePhotos">Delete profile photos: photos.deletePhotos</a>
* <a href="account_deleteSecureValue.html" name="account_deleteSecureValue">Delete secure telegram passport value: account.deleteSecureValue</a>
* <a href="channels_deleteHistory.html" name="channels_deleteHistory">Delete the history of a supergroup/channel: channels.deleteHistory</a>
* <a href="account_deleteAccount.html" name="account_deleteAccount">Delete this account: account.deleteAccount</a>
* <a href="account_updateDeviceLocked.html" name="account_updateDeviceLocked">Disable all notifications for a certain period: account.updateDeviceLocked</a>
* <a href="upload_getWebFile.html" name="upload_getWebFile">Download a file through telegram: upload.getWebFile</a>
* <a href="messages_editMessage.html" name="messages_editMessage">Edit a message: messages.editMessage</a>
* <a href="messages_editInlineBotMessage.html" name="messages_editInlineBotMessage">Edit a sent inline message: messages.editInlineBotMessage</a>
* <a href="channels_editAdmin.html" name="channels_editAdmin">Edit admin permissions of a user in a channel/supergroup: channels.editAdmin</a>
* <a href="messages_editChatAdmin.html" name="messages_editChatAdmin">Edit admin permissions: messages.editChatAdmin</a>
* <a href="messages_editChatAbout.html" name="messages_editChatAbout">Edit chat info: messages.editChatAbout</a>
* <a href="channels_editCreator.html" name="channels_editCreator">Edit creator of channel: channels.editCreator</a>
* <a href="messages_editChatDefaultBannedRights.html" name="messages_editChatDefaultBannedRights">Edit default rights of chat: messages.editChatDefaultBannedRights</a>
* <a href="folders_editPeerFolders.html" name="folders_editPeerFolders">Edit folder: folders.editPeerFolders</a>
* <a href="channels_editLocation.html" name="channels_editLocation">Edit location (geochats): channels.editLocation</a>
* <a href="messages_editChatPhoto.html" name="messages_editChatPhoto">Edit the photo of a normal chat (not supergroup): messages.editChatPhoto</a>
* <a href="channels_editPhoto.html" name="channels_editPhoto">Edit the photo of a supergroup/channel: channels.editPhoto</a>
* <a href="messages_editChatTitle.html" name="messages_editChatTitle">Edit the title of a normal chat (not supergroup): messages.editChatTitle</a>
* <a href="channels_editTitle.html" name="channels_editTitle">Edit the title of a supergroup/channel: channels.editTitle</a>
* <a href="help_editUserInfo.html" name="help_editUserInfo">Edit user info: help.editUserInfo</a>
* <a href="channels_togglePreHistoryHidden.html" name="channels_togglePreHistoryHidden">Enable or disable hidden history for new channel/supergroup users: channels.togglePreHistoryHidden</a>
* <a href="messages_exportChatInvite.html" name="messages_exportChatInvite">Export chat invite : messages.exportChatInvite</a>
* <a href="messages_searchStickerSets.html" name="messages_searchStickerSets">Find a sticker set: messages.searchStickerSets</a>
* <a href="account_finishTakeoutSession.html" name="account_finishTakeoutSession">Finish account exporting session: account.finishTakeoutSession</a>
* <a href="messages_forwardMessages.html" name="messages_forwardMessages">Forward messages: messages.forwardMessages</a>
* <a href="help_getCdnConfig.html" name="help_getCdnConfig">Get CDN configuration: help.getCdnConfig</a>
* <a href="messages_getStickerSet.html" name="messages_getStickerSet">Get a stickerset: messages.getStickerSet</a>
* <a href="account_getAccountTTL.html" name="account_getAccountTTL">Get account TTL: account.getAccountTTL</a>
* <a href="channels_getAdminLog.html" name="channels_getAdminLog">Get admin log of a channel/supergroup: channels.getAdminLog</a>
* <a href="messages_getArchivedStickers.html" name="messages_getArchivedStickers">Get all archived stickers: messages.getArchivedStickers</a>
* <a href="channels_getLeftChannels.html" name="channels_getLeftChannels">Get all channels you left: channels.getLeftChannels</a>
* <a href="messages_getAllChats.html" name="messages_getAllChats">Get all chats (not supergroups or channels): messages.getAllChats</a>
* <a href="contacts_getContacts.html" name="contacts_getContacts">Get all contacts: contacts.getContacts</a>
* <a href="account_getAuthorizations.html" name="account_getAuthorizations">Get all logged-in authorizations: account.getAuthorizations</a>
* <a href="messages_getAllDrafts.html" name="messages_getAllDrafts">Get all message drafts: messages.getAllDrafts</a>
* <a href="account_getAllSecureValues.html" name="account_getAllSecureValues">Get all secure telegram passport values: account.getAllSecureValues</a>
* <a href="messages_getAllStickers.html" name="messages_getAllStickers">Get all stickerpacks: messages.getAllStickers</a>
* <a href="channels_getAdminedPublicChannels.html" name="channels_getAdminedPublicChannels">Get all supergroups/channels where you're admin: channels.getAdminedPublicChannels</a>
* <a href="messages_getMessagesViews.html" name="messages_getMessagesViews">Get and increase message views: messages.getMessagesViews</a>
* <a href="help_getAppConfig.html" name="help_getAppConfig">Get app config: help.getAppConfig</a>
* <a href="account_getAutoDownloadSettings.html" name="account_getAutoDownloadSettings">Get autodownload settings: account.getAutoDownloadSettings</a>
* <a href="langpack_getLanguages.html" name="langpack_getLanguages">Get available languages: langpack.getLanguages</a>
* <a href="contacts_getBlocked.html" name="contacts_getBlocked">Get blocked users: contacts.getBlocked</a>
* <a href="phone_getCallConfig.html" name="phone_getCallConfig">Get call configuration: phone.getCallConfig</a>
* <a href="channels_getMessages.html" name="channels_getMessages">Get channel/supergroup messages: channels.getMessages</a>
* <a href="channels_getParticipants.html" name="channels_getParticipants">Get channel/supergroup participants (you should use `$MadelineProto->get_pwr_chat($id)` instead): channels.getParticipants</a>
* <a href="messages_getCommonChats.html" name="messages_getCommonChats">Get chats in common with a user: messages.getCommonChats</a>
* <a href="contacts_getContactIDs.html" name="contacts_getContactIDs">Get contacts by IDs: contacts.getContactIDs</a>
* <a href="help_getDeepLinkInfo.html" name="help_getDeepLinkInfo">Get deep link info: help.getDeepLinkInfo</a>
* <a href="messages_getPeerDialogs.html" name="messages_getPeerDialogs">Get dialog info of peers: messages.getPeerDialogs</a>
* <a href="messages_getDialogUnreadMarks.html" name="messages_getDialogUnreadMarks">Get dialogs marked as unread manually: messages.getDialogUnreadMarks</a>
* <a href="messages_getDocumentByHash.html" name="messages_getDocumentByHash">Get document by SHA256 hash: messages.getDocumentByHash</a>
* <a href="messages_getEmojiURL.html" name="messages_getEmojiURL">Get emoji URL: messages.getEmojiURL</a>
* <a href="messages_getEmojiKeywordsDifference.html" name="messages_getEmojiKeywordsDifference">Get emoji keyword difference: messages.getEmojiKeywordsDifference</a>
* <a href="messages_getEmojiKeywordsLanguages.html" name="messages_getEmojiKeywordsLanguages">Get emoji keyword languages: messages.getEmojiKeywordsLanguages</a>
* <a href="messages_getEmojiKeywords.html" name="messages_getEmojiKeywords">Get emoji keywords: messages.getEmojiKeywords</a>
* <a href="messages_getFavedStickers.html" name="messages_getFavedStickers">Get favorite stickers: messages.getFavedStickers</a>
* <a href="messages_getFeaturedStickers.html" name="messages_getFeaturedStickers">Get featured stickers: messages.getFeaturedStickers</a>
* <a href="channels_getGroupsForDiscussion.html" name="channels_getGroupsForDiscussion">Get groups for discussion: channels.getGroupsForDiscussion</a>
* <a href="messages_getInlineGameHighScores.html" name="messages_getInlineGameHighScores">Get high scores of a game sent in an inline message: messages.getInlineGameHighScores</a>
* <a href="messages_getGameHighScores.html" name="messages_getGameHighScores">Get high scores of a game: messages.getGameHighScores</a>
* <a href="channels_getParticipant.html" name="channels_getParticipant">Get info about a certain channel/supergroup participant: channels.getParticipant</a>
* <a href="help_getAppUpdate.html" name="help_getAppUpdate">Get info about app updates: help.getAppUpdate</a>
* <a href="messages_getChats.html" name="messages_getChats">Get info about chats: messages.getChats</a>
* <a href="channels_getChannels.html" name="channels_getChannels">Get info about multiple channels/supergroups: channels.getChannels</a>
* <a href="users_getUsers.html" name="users_getUsers">Get info about users: users.getUsers</a>
* <a href="help_getSupport.html" name="help_getSupport">Get info of support user: help.getSupport</a>
* <a href="help_getProxyData.html" name="help_getProxyData">Get information about the current proxy: help.getProxyData</a>
* <a href="help_getInviteText.html" name="help_getInviteText">Get invitation text: help.getInviteText</a>
* <a href="langpack_getStrings.html" name="langpack_getStrings">Get language pack strings: langpack.getStrings</a>
* <a href="langpack_getDifference.html" name="langpack_getDifference">Get language pack updates: langpack.getDifference</a>
* <a href="langpack_getLangPack.html" name="langpack_getLangPack">Get language pack: langpack.getLangPack</a>
* <a href="langpack_getLanguage.html" name="langpack_getLanguage">Get language: langpack.getLanguage</a>
* <a href="messages_getMaskStickers.html" name="messages_getMaskStickers">Get masks: messages.getMaskStickers</a>
* <a href="messages_getSplitRanges.html" name="messages_getSplitRanges">Get message ranges to fetch: messages.getSplitRanges</a>
* <a href="messages_getMessages.html" name="messages_getMessages">Get messages: messages.getMessages</a>
* <a href="contacts_getTopPeers.html" name="contacts_getTopPeers">Get most used chats: contacts.getTopPeers</a>
* <a href="help_getNearestDc.html" name="help_getNearestDc">Get nearest datacenter: help.getNearestDc</a>
* <a href="account_getNotifyExceptions.html" name="account_getNotifyExceptions">Get notification exceptions: account.getNotifyExceptions</a>
* <a href="account_getNotifySettings.html" name="account_getNotifySettings">Get notification settings: account.getNotifySettings</a>
* <a href="contacts_getStatuses.html" name="contacts_getStatuses">Get online status of all users: contacts.getStatuses</a>
* <a href="messages_getOnlines.html" name="messages_getOnlines">Get online users: messages.getOnlines</a>
* <a href="help_getPassportConfig.html" name="help_getPassportConfig">Get passport config: help.getPassportConfig</a>
* <a href="payments_getPaymentForm.html" name="payments_getPaymentForm">Get payment form: payments.getPaymentForm</a>
* <a href="payments_getPaymentReceipt.html" name="payments_getPaymentReceipt">Get payment receipt: payments.getPaymentReceipt</a>
* <a href="contacts_getLocated.html" name="contacts_getLocated">Get people nearby (geochats): contacts.getLocated</a>
* <a href="messages_getPinnedDialogs.html" name="messages_getPinnedDialogs">Get pinned dialogs: messages.getPinnedDialogs</a>
* <a href="messages_getPollResults.html" name="messages_getPollResults">Get poll results: messages.getPollResults</a>
* <a href="messages_getHistory.html" name="messages_getHistory">Get previous messages of a group: messages.getHistory</a>
* <a href="account_getPrivacy.html" name="account_getPrivacy">Get privacy settings: account.getPrivacy</a>
* <a href="messages_getRecentLocations.html" name="messages_getRecentLocations">Get recent locations: messages.getRecentLocations</a>
* <a href="messages_getRecentStickers.html" name="messages_getRecentStickers">Get recent stickers: messages.getRecentStickers</a>
* <a href="help_getRecentMeUrls.html" name="help_getRecentMeUrls">Get recent t.me URLs: help.getRecentMeUrls</a>
* <a href="contacts_getSaved.html" name="contacts_getSaved">Get saved contacts: contacts.getSaved</a>
* <a href="messages_getSavedGifs.html" name="messages_getSavedGifs">Get saved gifs: messages.getSavedGifs</a>
* <a href="payments_getSavedInfo.html" name="payments_getSavedInfo">Get saved payments info: payments.getSavedInfo</a>
* <a href="messages_getSearchCounters.html" name="messages_getSearchCounters">Get search counter: messages.getSearchCounters</a>
* <a href="account_getSecureValue.html" name="account_getSecureValue">Get secure value for telegram passport: account.getSecureValue</a>
* <a href="help_getConfig.html" name="help_getConfig">Get server configuration: help.getConfig</a>
* <a href="messages_getStatsURL.html" name="messages_getStatsURL">Get stats URL: messages.getStatsURL</a>
* <a href="messages_getAttachedStickers.html" name="messages_getAttachedStickers">Get stickers attachable to images: messages.getAttachedStickers</a>
* <a href="messages_getStickers.html" name="messages_getStickers">Get stickers: messages.getStickers</a>
* <a href="help_getSupportName.html" name="help_getSupportName">Get support name: help.getSupportName</a>
* <a href="account_getWebAuthorizations.html" name="account_getWebAuthorizations">Get telegram web login authorizations: account.getWebAuthorizations</a>
* <a href="account_getTmpPassword.html" name="account_getTmpPassword">Get temporary password for buying products through bots: account.getTmpPassword</a>
* <a href="messages_getBotCallbackAnswer.html" name="messages_getBotCallbackAnswer">Get the callback answer of a bot (after clicking a button): messages.getBotCallbackAnswer</a>
* <a href="help_getAppChangelog.html" name="help_getAppChangelog">Get the changelog of this app: help.getAppChangelog</a>
* <a href="account_getPassword.html" name="account_getPassword">Get the current password: account.getPassword</a>
* <a href="channels_exportMessageLink.html" name="channels_exportMessageLink">Get the link of a message in a channel: channels.exportMessageLink</a>
* <a href="photos_getUserPhotos.html" name="photos_getUserPhotos">Get the profile photos of a user: photos.getUserPhotos</a>
* <a href="messages_getPeerSettings.html" name="messages_getPeerSettings">Get the settings of apeer: messages.getPeerSettings</a>
* <a href="messages_getUnreadMentions.html" name="messages_getUnreadMentions">Get unread mentions: messages.getUnreadMentions</a>
* <a href="help_getTermsOfServiceUpdate.html" name="help_getTermsOfServiceUpdate">Get updated TOS: help.getTermsOfServiceUpdate</a>
* <a href="help_getUserInfo.html" name="help_getUserInfo">Get user info: help.getUserInfo</a>
* <a href="account_getWallPaper.html" name="account_getWallPaper">Get wallpaper info: account.getWallPaper</a>
* <a href="messages_getWebPage.html" name="messages_getWebPage">Get webpage preview: messages.getWebPage</a>
* <a href="messages_getWebPagePreview.html" name="messages_getWebPagePreview">Get webpage preview: messages.getWebPagePreview</a>
* <a href="messages_getDialogs.html" name="messages_getDialogs">Gets list of chats: you should use $MadelineProto->get_dialogs() instead: https://docs.madelineproto.xyz/docs/DIALOGS.html: messages.getDialogs</a>
* <a href="messages_searchGlobal.html" name="messages_searchGlobal">Global message search: messages.searchGlobal</a>
* <a href="messages_hidePeerSettingsBar.html" name="messages_hidePeerSettingsBar">Hide peer settings bar: messages.hidePeerSettingsBar</a>
* <a href="messages_importChatInvite.html" name="messages_importChatInvite">Import chat invite: messages.importChatInvite</a>
* <a href="initConnection.html" name="initConnection">Initializes connection and save information on the user's device and application.: initConnection</a>
* <a href="account_installWallPaper.html" name="account_installWallPaper">Install wallpaper: account.installWallPaper</a>
* <a href="auth_cancelCode.html" name="auth_cancelCode">Invalidate sent phone code: auth.cancelCode</a>
* <a href="invokeWithTakeout.html" name="invokeWithTakeout">Invoke method from takeout session: invokeWithTakeout</a>
* <a href="invokeWithLayer.html" name="invokeWithLayer">Invoke this method with layer X: invokeWithLayer</a>
* <a href="invokeWithMessagesRange.html" name="invokeWithMessagesRange">Invoke with messages range: invokeWithMessagesRange</a>
* <a href="invokeWithoutUpdates.html" name="invokeWithoutUpdates">Invoke with method without returning updates in the socket: invokeWithoutUpdates</a>
* <a href="invokeAfterMsg.html" name="invokeAfterMsg">Invokes a query after successfull completion of one of the previous queries.: invokeAfterMsg</a>
* <a href="channels_joinChannel.html" name="channels_joinChannel">Join a channel/supergroup: channels.joinChannel</a>
* <a href="channels_editBanned.html" name="channels_editBanned">Kick or ban a user from a channel/supergroup: channels.editBanned</a>
* <a href="channels_leaveChannel.html" name="channels_leaveChannel">Leave a channel/supergroup: channels.leaveChannel</a>
* <a href="help_saveAppLog.html" name="help_saveAppLog">Log data for developer of this app: help.saveAppLog</a>
* <a href="channels_readHistory.html" name="channels_readHistory">Mark channel/supergroup history as read: channels.readHistory</a>
* <a href="channels_readMessageContents.html" name="channels_readMessageContents">Mark channel/supergroup messages as read: channels.readMessageContents</a>
* <a href="messages_markDialogUnread.html" name="messages_markDialogUnread">Mark dialog as unread : messages.markDialogUnread</a>
* <a href="messages_readMentions.html" name="messages_readMentions">Mark mentions as read: messages.readMentions</a>
* <a href="messages_readMessageContents.html" name="messages_readMessageContents">Mark message as read: messages.readMessageContents</a>
* <a href="messages_readEncryptedHistory.html" name="messages_readEncryptedHistory">Mark messages as read in secret chats: messages.readEncryptedHistory</a>
* <a href="messages_readHistory.html" name="messages_readHistory">Mark messages as read: messages.readHistory</a>
* <a href="messages_receivedMessages.html" name="messages_receivedMessages">Mark messages as read: messages.receivedMessages</a>
* <a href="messages_readFeaturedStickers.html" name="messages_readFeaturedStickers">Mark new featured stickers as read: messages.readFeaturedStickers</a>
* <a href="phone_receivedCall.html" name="phone_receivedCall">Notify server that you received a call (server will refuse all incoming calls until the current call is over): phone.receivedCall</a>
* <a href="messages_toggleDialogPin.html" name="messages_toggleDialogPin">Pin or unpin dialog: messages.toggleDialogPin</a>
* <a href="account_registerDevice.html" name="account_registerDevice">Register device for push notifications: account.registerDevice</a>
* <a href="messages_uninstallStickerSet.html" name="messages_uninstallStickerSet">Remove a sticker set: messages.uninstallStickerSet</a>
* <a href="stickers_removeStickerFromSet.html" name="stickers_removeStickerFromSet">Remove sticker from stickerset: stickers.removeStickerFromSet</a>
* <a href="messages_reorderPinnedDialogs.html" name="messages_reorderPinnedDialogs">Reorder pinned dialogs: messages.reorderPinnedDialogs</a>
* <a href="messages_reorderStickerSets.html" name="messages_reorderStickerSets">Reorder sticker sets: messages.reorderStickerSets</a>
* <a href="channels_reportSpam.html" name="channels_reportSpam">Report a message in a supergroup/channel for spam: channels.reportSpam</a>
* <a href="messages_report.html" name="messages_report">Report a message: messages.report</a>
* <a href="messages_reportSpam.html" name="messages_reportSpam">Report a peer for spam: messages.reportSpam</a>
* <a href="messages_reportEncryptedSpam.html" name="messages_reportEncryptedSpam">Report for spam a secret chat: messages.reportEncryptedSpam</a>
* <a href="account_reportPeer.html" name="account_reportPeer">Report for spam: account.reportPeer</a>
* <a href="messages_requestUrlAuth.html" name="messages_requestUrlAuth">Request URL authorization: messages.requestUrlAuth</a>
* <a href="account_resendPasswordEmail.html" name="account_resendPasswordEmail">Resend password recovery email: account.resendPasswordEmail</a>
* <a href="auth_resendCode.html" name="auth_resendCode">Resend the SMS verification code: auth.resendCode</a>
* <a href="account_resetNotifySettings.html" name="account_resetNotifySettings">Reset all notification settings: account.resetNotifySettings</a>
* <a href="account_resetWebAuthorizations.html" name="account_resetWebAuthorizations">Reset all telegram web login authorizations: account.resetWebAuthorizations</a>
* <a href="contacts_resetSaved.html" name="contacts_resetSaved">Reset saved contacts: contacts.resetSaved</a>
* <a href="contacts_resetTopPeerRating.html" name="contacts_resetTopPeerRating">Reset top peer rating for a certain category/peer: contacts.resetTopPeerRating</a>
* <a href="account_resetWallPapers.html" name="account_resetWallPapers">Reset wallpapers: account.resetWallPapers</a>
* <a href="invokeAfterMsgs.html" name="invokeAfterMsgs">Result type returned by a current query.: invokeAfterMsgs</a>
* <a href="account_getWallPapers.html" name="account_getWallPapers">Returns a list of available wallpapers.: account.getWallPapers</a>
* <a href="messages_saveGif.html" name="messages_saveGif">Save a GIF: messages.saveGif</a>
* <a href="messages_saveDraft.html" name="messages_saveDraft">Save a message draft: messages.saveDraft</a>
* <a href="account_saveAutoDownloadSettings.html" name="account_saveAutoDownloadSettings">Save autodownload settings: account.saveAutoDownloadSettings</a>
* <a href="phone_saveCallDebug.html" name="phone_saveCallDebug">Save call debugging info: phone.saveCallDebug</a>
* <a href="account_saveSecureValue.html" name="account_saveSecureValue">Save telegram passport secure value: account.saveSecureValue</a>
* <a href="account_saveWallPaper.html" name="account_saveWallPaper">Save wallpaper: account.saveWallPaper</a>
* <a href="contacts_search.html" name="contacts_search">Search contacts: contacts.search</a>
* <a href="messages_searchGifs.html" name="messages_searchGifs">Search gifs: messages.searchGifs</a>
* <a href="messages_search.html" name="messages_search">Search peers or messages: messages.search</a>
* <a href="bots_sendCustomRequest.html" name="bots_sendCustomRequest">Send a custom request to the bot API: bots.sendCustomRequest</a>
* <a href="messages_sendEncryptedFile.html" name="messages_sendEncryptedFile">Send a file to a secret chat: messages.sendEncryptedFile</a>
* <a href="messages_sendMedia.html" name="messages_sendMedia">Send a media: messages.sendMedia</a>
* <a href="messages_sendMessage.html" name="messages_sendMessage">Send a message: messages.sendMessage</a>
* <a href="messages_sendEncryptedService.html" name="messages_sendEncryptedService">Send a service message to a secret chat: messages.sendEncryptedService</a>
* <a href="messages_sendMultiMedia.html" name="messages_sendMultiMedia">Send an album: messages.sendMultiMedia</a>
* <a href="auth_requestPasswordRecovery.html" name="auth_requestPasswordRecovery">Send an email to recover the 2FA password: auth.requestPasswordRecovery</a>
* <a href="account_sendConfirmPhoneCode.html" name="account_sendConfirmPhoneCode">Send confirmation phone code: account.sendConfirmPhoneCode</a>
* <a href="account_sendVerifyEmailCode.html" name="account_sendVerifyEmailCode">Send email verification code: account.sendVerifyEmailCode</a>
* <a href="messages_sendInlineBotResult.html" name="messages_sendInlineBotResult">Send inline bot result obtained with messages.getInlineBotResults to the chat: messages.sendInlineBotResult</a>
* <a href="messages_sendEncrypted.html" name="messages_sendEncrypted">Send message to secret chat: messages.sendEncrypted</a>
* <a href="account_sendVerifyPhoneCode.html" name="account_sendVerifyPhoneCode">Send phone verification code: account.sendVerifyPhoneCode</a>
* <a href="messages_sendScreenshotNotification.html" name="messages_sendScreenshotNotification">Send screenshot notification: messages.sendScreenshotNotification</a>
* <a href="messages_setEncryptedTyping.html" name="messages_setEncryptedTyping">Send typing notification to secret chat: messages.setEncryptedTyping</a>
* <a href="messages_sendVote.html" name="messages_sendVote">Send vote: messages.sendVote</a>
* <a href="bots_answerWebhookJSONQuery.html" name="bots_answerWebhookJSONQuery">Send webhook request via bot API: bots.answerWebhookJSONQuery</a>
* <a href="account_setAccountTTL.html" name="account_setAccountTTL">Set account TTL: account.setAccountTTL</a>
* <a href="account_setContactSignUpNotification.html" name="account_setContactSignUpNotification">Set contact sign up notification: account.setContactSignUpNotification</a>
* <a href="channels_setDiscussionGroup.html" name="channels_setDiscussionGroup">Set discussion group of channel: channels.setDiscussionGroup</a>
* <a href="phone_setCallRating.html" name="phone_setCallRating">Set phone call rating: phone.setCallRating</a>
* <a href="account_setPrivacy.html" name="account_setPrivacy">Set privacy settings: account.setPrivacy</a>
* <a href="users_setSecureValueErrors.html" name="users_setSecureValueErrors">Set secure value error for telegram passport: users.setSecureValueErrors</a>
* <a href="messages_setInlineGameScore.html" name="messages_setInlineGameScore">Set the game score of an inline message: messages.setInlineGameScore</a>
* <a href="messages_setGameScore.html" name="messages_setGameScore">Set the game score: messages.setGameScore</a>
* <a href="channels_setStickers.html" name="channels_setStickers">Set the supergroup/channel stickerpack: channels.setStickers</a>
* <a href="help_setBotUpdatesStatus.html" name="help_setBotUpdatesStatus">Set the update status of webhook: help.setBotUpdatesStatus</a>
* <a href="messages_startBot.html" name="messages_startBot">Start a bot: messages.startBot</a>
* <a href="account_initTakeoutSession.html" name="account_initTakeoutSession">Start account exporting session: account.initTakeoutSession</a>
* <a href="account_unregisterDevice.html" name="account_unregisterDevice">Stop sending PUSH notifications to app: account.unregisterDevice</a>
* <a href="channels_toggleSignatures.html" name="channels_toggleSignatures">Toggle channel signatures: channels.toggleSignatures</a>
* <a href="channels_toggleSlowMode.html" name="channels_toggleSlowMode">Toggle slow mode: channels.toggleSlowMode</a>
* <a href="contacts_toggleTopPeers.html" name="contacts_toggleTopPeers">Toggle top peers: contacts.toggleTopPeers</a>
* <a href="contacts_unblock.html" name="contacts_unblock">Unblock a user: contacts.unblock</a>
* <a href="account_updateStatus.html" name="account_updateStatus">Update online status: account.updateStatus</a>
* <a href="messages_updatePinnedMessage.html" name="messages_updatePinnedMessage">Update pinned message: messages.updatePinnedMessage</a>
* <a href="account_updateProfile.html" name="account_updateProfile">Update profile info: account.updateProfile</a>
* <a href="channels_updateUsername.html" name="channels_updateUsername">Update the username of a supergroup/channel: channels.updateUsername</a>
* <a href="account_updateUsername.html" name="account_updateUsername">Update this user's username: account.updateUsername</a>
* <a href="messages_uploadMedia.html" name="messages_uploadMedia">Upload a file without sending it to anyone: messages.uploadMedia</a>
* <a href="messages_uploadEncryptedFile.html" name="messages_uploadEncryptedFile">Upload a secret chat file without sending it to anyone: messages.uploadEncryptedFile</a>
* <a href="photos_uploadProfilePhoto.html" name="photos_uploadProfilePhoto">Upload profile photo: photos.uploadProfilePhoto</a>
* <a href="account_uploadWallPaper.html" name="account_uploadWallPaper">Upload wallpaper: account.uploadWallPaper</a>
* <a href="auth_recoverPassword.html" name="auth_recoverPassword">Use the code that was emailed to you after running $MadelineProto->auth->requestPasswordRecovery to login to your account: auth.recoverPassword</a>
* <a href="payments_validateRequestedInfo.html" name="payments_validateRequestedInfo">Validate requested payment info: payments.validateRequestedInfo</a>
* <a href="account_verifyEmail.html" name="account_verifyEmail">Verify email address: account.verifyEmail</a>
* <a href="account_verifyPhone.html" name="account_verifyPhone">Verify phone number: account.verifyPhone</a>

View File

@ -50,11 +50,11 @@ Or, if you're into Lua:
X = initConnection({api_id=int, device_model='string', system_version='string', app_version='string', system_lang_code='string', lang_pack='string', lang_code='string', proxy=InputClientProxy, query=!X, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CONNECTION_LAYER_INVALID|Layer invalid|
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
| Code | Type | Description |
|------|----------|---------------|
|400|CONNECTION_LAYER_INVALID|Layer invalid|
|400|INPUT_FETCH_FAIL|Failed deserializing TL payload|

View File

@ -43,21 +43,21 @@ Or, if you're into Lua:
X = invokeWithLayer({layer=int, query=!X, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|AUTH_BYTES_INVALID|The provided authorization is invalid|
|CDN_METHOD_INVALID|You can't call this method in a CDN DC|
|CONNECTION_API_ID_INVALID|The provided API id is invalid|
|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|CONNECTION_LANG_PACK_INVALID|Language pack invalid|
|CONNECTION_NOT_INITED|Connection not initialized|
|CONNECTION_SYSTEM_EMPTY|Connection system empty|
|INPUT_LAYER_INVALID|The provided layer is invalid|
|INVITE_HASH_EXPIRED|The invite link has expired|
|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|AUTH_BYTES_INVALID|The provided authorization is invalid|
|400|CDN_METHOD_INVALID|You can't call this method in a CDN DC|
|400|CONNECTION_API_ID_INVALID|The provided API id is invalid|
|400|CONNECTION_DEVICE_MODEL_EMPTY|Device model empty|
|400|CONNECTION_LANG_PACK_INVALID|Language pack invalid|
|400|CONNECTION_NOT_INITED|Connection not initialized|
|400|CONNECTION_SYSTEM_EMPTY|Connection system empty|
|400|INPUT_LAYER_INVALID|The provided layer is invalid|
|400|INVITE_HASH_EXPIRED|The invite link has expired|
|406|AUTH_KEY_DUPLICATED|An auth key with the same ID was already generated|
|403|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|-503|Timeout|Timeout while fetching data|

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
LangPackDifference = langpack.getDifference({lang_pack='string', lang_code='string', from_version=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|LANG_PACK_INVALID|The provided language pack is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|LANG_PACK_INVALID|The provided language pack is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
LangPackDifference = langpack.getLangPack({lang_pack='string', lang_code='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|LANG_PACK_INVALID|The provided language pack is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|LANG_PACK_INVALID|The provided language pack is invalid|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
Vector_of_LangPackLanguage = langpack.getLanguages({lang_pack='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|LANG_PACK_INVALID|The provided language pack is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|LANG_PACK_INVALID|The provided language pack is invalid|

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
Vector_of_LangPackString = langpack.getStrings({lang_pack='string', lang_code='string', keys={'string'}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|LANG_PACK_INVALID|The provided language pack is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|LANG_PACK_INVALID|The provided language pack is invalid|

View File

@ -7,8 +7,49 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats**
You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|peer|[Secret chat ID, Update, EncryptedMessage or InputEncryptedChat](../types/InputEncryptedChat.md) | You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats | Yes|
|g\_b|[bytes](../types/bytes.md) | You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats | Yes|
|key\_fingerprint|[long](../types/long.md) | You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats | Yes|
### Return type: [EncryptedChat](../types/EncryptedChat.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$EncryptedChat = $MadelineProto->messages->acceptEncryption(['peer' => InputEncryptedChat, 'g_b' => 'bytes', 'key_fingerprint' => long, ]);
```
Or, if you're into Lua:
```lua
EncryptedChat = messages.acceptEncryption({peer=InputEncryptedChat, g_b='bytes', key_fingerprint=long, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|ENCRYPTION_ALREADY_ACCEPTED|Secret chat already accepted|
|400|ENCRYPTION_ALREADY_DECLINED|The secret chat was already declined|

View File

@ -44,18 +44,18 @@ Or, if you're into Lua:
Updates = messages.addChatUser({chat_id=InputPeer, user_id=InputUser, fwd_limit=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|CHAT_ID_INVALID|The provided chat id is invalid|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|PEER_ID_INVALID|The provided peer id is invalid|
|USER_ALREADY_PARTICIPANT|The user is already in the group|
|USER_ID_INVALID|The provided user ID is invalid|
|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|INPUT_USER_DEACTIVATED|The specified user was deleted|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|400|USER_ALREADY_PARTICIPANT|The user is already in the group|
|400|USER_ID_INVALID|The provided user ID is invalid|
|400|USERS_TOO_MUCH|The maximum number of users has been exceeded (to create a chat, for example)|
|403|USER_NOT_MUTUAL_CONTACT|The provided user is not a mutual contact|
|403|USER_PRIVACY_RESTRICTED|The user's privacy settings do not allow you to do this|

View File

@ -42,12 +42,12 @@ Or, if you're into Lua:
ChatInvite = messages.checkChatInvite({hash='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|INVITE_HASH_EMPTY|The invite hash is empty|
|INVITE_HASH_EXPIRED|The invite link has expired|
|INVITE_HASH_INVALID|The invite hash is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|INVITE_HASH_EMPTY|The invite hash is empty|
|400|INVITE_HASH_EXPIRED|The invite link has expired|
|400|INVITE_HASH_INVALID|The invite hash is invalid|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Updates = messages.createChat({users={InputUser}, title='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|USERS_TOO_FEW|Not enough users (to create a chat, for example)|
|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|
| Code | Type | Description |
|------|----------|---------------|
|400|USERS_TOO_FEW|Not enough users (to create a chat, for example)|
|403|USER_RESTRICTED|You're spamreported, you can't create channels or chats.|

View File

@ -43,12 +43,12 @@ Or, if you're into Lua:
Updates = messages.deleteChatUser({chat_id=InputPeer, user_id=InputUser, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ID_INVALID|The provided chat id is invalid|
|PEER_ID_INVALID|The provided peer id is invalid|
|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|400|USER_NOT_PARTICIPANT|You're not a member of this supergroup/channel|

View File

@ -45,10 +45,10 @@ Or, if you're into Lua:
messages_AffectedHistory = messages.deleteHistory({just_clear=Bool, revoke=Bool, peer=InputPeer, max_id=int, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
messages_AffectedMessages = messages.deleteMessages({revoke=Bool, id={int}, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|
| Code | Type | Description |
|------|----------|---------------|
|403|MESSAGE_DELETE_FORBIDDEN|You can't delete one of the messages you tried to delete, most likely because it is a service message.|

View File

@ -7,8 +7,47 @@ image: https://docs.madelineproto.xyz/favicons/android-chrome-256x256.png
[Back to methods index](index.md)
**You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats**
You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats
### Parameters:
| Name | Type | Description | Required |
|----------|---------------|-------------|----------|
|chat\_id|[int](../types/int.md) | You cannot use this method directly, see https://docs.madelineproto.xyz for more info on handling secret chats | Yes|
### Return type: [Bool](../types/Bool.md)
### Can bots use this method: **NO**
### MadelineProto Example ([now async for huge speed and parallelism!](https://docs.madelineproto.xyz/docs/ASYNC.html)):
```php
if (!file_exists('madeline.php')) {
copy('https://phar.madelineproto.xyz/madeline.php', 'madeline.php');
}
include 'madeline.php';
$MadelineProto = new \danog\MadelineProto\API('session.madeline');
$MadelineProto->start();
$Bool = $MadelineProto->messages->discardEncryption(['chat_id' => int, ]);
```
Or, if you're into Lua:
```lua
Bool = messages.discardEncryption({chat_id=int, })
```
### Errors
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_EMPTY|The provided chat ID is empty|
|400|ENCRYPTION_ALREADY_DECLINED|The secret chat was already declined|
|400|ENCRYPTION_ID_INVALID|The provided secret chat ID is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = messages.editChatAbout({peer=InputPeer, about='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -44,10 +44,10 @@ Or, if you're into Lua:
Bool = messages.editChatAdmin({chat_id=InputPeer, user_id=InputUser, is_admin=Bool, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ID_INVALID|The provided chat id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Updates = messages.editChatDefaultBannedRights({peer=InputPeer, banned_rights=ChatBannedRights, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|BANNED_RIGHTS_INVALID|You provided some invalid flags in the banned rights|
|PEER_ID_INVALID|The provided peer id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|BANNED_RIGHTS_INVALID|You provided some invalid flags in the banned rights|
|400|PEER_ID_INVALID|The provided peer id is invalid|

View File

@ -43,14 +43,14 @@ Or, if you're into Lua:
Updates = messages.editChatPhoto({chat_id=InputPeer, photo=InputChatPhoto, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ID_INVALID|The provided chat id is invalid|
|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|PEER_ID_INVALID|The provided peer id is invalid|
|PHOTO_EXT_INVALID|The extension of the photo is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|INPUT_CONSTRUCTOR_INVALID|The provided constructor is invalid|
|400|INPUT_FETCH_FAIL|Failed deserializing TL payload|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|400|PHOTO_EXT_INVALID|The extension of the photo is invalid|

View File

@ -43,11 +43,11 @@ Or, if you're into Lua:
Updates = messages.editChatTitle({chat_id=InputPeer, title='string', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ID_INVALID|The provided chat id is invalid|
|CHAT_TITLE_EMPTY|No chat title provided|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|CHAT_TITLE_EMPTY|No chat title provided|

View File

@ -96,11 +96,11 @@ You can also use normal markdown, note that to create mentions you must use the
```
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|MESSAGE_ID_INVALID|The provided message id is invalid|
|MESSAGE_NOT_MODIFIED|The message text has not changed|
| Code | Type | Description |
|------|----------|---------------|
|400|MESSAGE_ID_INVALID|The provided message id is invalid|
|400|MESSAGE_NOT_MODIFIED|The message text has not changed|

View File

@ -97,20 +97,20 @@ You can also use normal markdown, note that to create mentions you must use the
```
MadelineProto supports all html entities supported by [html_entity_decode](http://php.net/manual/en/function.html-entity-decode.php).
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.|
|MESSAGE_EMPTY|The provided message is empty|
|MESSAGE_ID_INVALID|The provided message id is invalid|
|MESSAGE_NOT_MODIFIED|The message text has not changed|
|PEER_ID_INVALID|The provided peer id is invalid|
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|MESSAGE_AUTHOR_REQUIRED|Message author required|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|INPUT_USER_DEACTIVATED|The specified user was deleted|
|400|MESSAGE_EDIT_TIME_EXPIRED|You can't edit this message anymore, too much time has passed since its creation.|
|400|MESSAGE_EMPTY|The provided message is empty|
|400|MESSAGE_ID_INVALID|The provided message id is invalid|
|400|MESSAGE_NOT_MODIFIED|The message text has not changed|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|400|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|403|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|403|MESSAGE_AUTHOR_REQUIRED|Message author required|

View File

@ -42,10 +42,10 @@ Or, if you're into Lua:
ExportedChatInvite = messages.exportChatInvite({peer=InputPeer, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHAT_ID_INVALID|The provided chat id is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|CHAT_ID_INVALID|The provided chat id is invalid|

View File

@ -43,10 +43,10 @@ Or, if you're into Lua:
Bool = messages.faveSticker({id=InputDocument, unfave=Bool, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|STICKER_ID_INVALID|The provided sticker ID is invalid|
| Code | Type | Description |
|------|----------|---------------|
|400|STICKER_ID_INVALID|The provided sticker ID is invalid|

View File

@ -48,29 +48,29 @@ Or, if you're into Lua:
Updates = messages.forwardMessages({silent=Bool, background=Bool, with_my_score=Bool, grouped=Bool, from_peer=InputPeer, id={int}, to_peer=InputPeer, })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|CHAT_ID_INVALID|The provided chat id is invalid|
|GROUPED_MEDIA_INVALID|Invalid grouped media|
|INPUT_USER_DEACTIVATED|The specified user was deleted|
|MEDIA_EMPTY|The provided media object is invalid|
|MESSAGE_ID_INVALID|The provided message id is invalid|
|MESSAGE_IDS_EMPTY|No message ids were provided|
|PEER_ID_INVALID|The provided peer id is invalid|
|RANDOM_ID_INVALID|A provided random ID is invalid|
|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|USER_IS_BLOCKED|You were blocked by this user|
|USER_IS_BOT|Bots can't send messages to other bots|
|YOU_BLOCKED_USER|You blocked this user|
|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat|
|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat|
|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.|
|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|CHANNEL_PRIVATE|You haven't joined this channel/supergroup|
|400|CHAT_ADMIN_REQUIRED|You must be an admin in this chat to do this|
|400|CHAT_ID_INVALID|The provided chat id is invalid|
|400|GROUPED_MEDIA_INVALID|Invalid grouped media|
|400|INPUT_USER_DEACTIVATED|The specified user was deleted|
|400|MEDIA_EMPTY|The provided media object is invalid|
|400|MESSAGE_ID_INVALID|The provided message id is invalid|
|400|MESSAGE_IDS_EMPTY|No message ids were provided|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|400|RANDOM_ID_INVALID|A provided random ID is invalid|
|400|USER_BANNED_IN_CHANNEL|You're banned from sending messages in supergroups/channels|
|400|USER_IS_BLOCKED|You were blocked by this user|
|400|USER_IS_BOT|Bots can't send messages to other bots|
|400|YOU_BLOCKED_USER|You blocked this user|
|403|CHAT_SEND_GIFS_FORBIDDEN|You can't send gifs in this chat|
|403|CHAT_SEND_MEDIA_FORBIDDEN|You can't send media in this chat|
|403|CHAT_SEND_STICKERS_FORBIDDEN|You can't send stickers in this chat.|
|403|CHAT_WRITE_FORBIDDEN|You can't write in this chat|
|-503|Timeout|Timeout while fetching data|

View File

@ -45,14 +45,14 @@ Or, if you're into Lua:
messages_BotCallbackAnswer = messages.getBotCallbackAnswer({game=Bool, peer=InputPeer, msg_id=int, data='bytes', })
```
### Errors this method can return:
### Errors
| Error | Description |
|----------|---------------|
|CHANNEL_INVALID|The provided channel is invalid|
|DATA_INVALID|Encrypted data invalid|
|MESSAGE_ID_INVALID|The provided message id is invalid|
|PEER_ID_INVALID|The provided peer id is invalid|
|Timeout|Timeout while fetching data|
| Code | Type | Description |
|------|----------|---------------|
|400|CHANNEL_INVALID|The provided channel is invalid|
|400|DATA_INVALID|Encrypted data invalid|
|400|MESSAGE_ID_INVALID|The provided message id is invalid|
|400|PEER_ID_INVALID|The provided peer id is invalid|
|-503|Timeout|Timeout while fetching data|

Some files were not shown because too many files have changed in this diff Show More