account.changeAuthorizationSettings
Change settings related to a session.
func (c *Client) AccountChangeAuthorizationSettings(ctx context.Context, request *AccountChangeAuthorizationSettingsRequest) (bool, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountChangeAuthorizationSettings(ctx, &tg.AccountChangeAuthorizationSettingsRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // bool
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Confirmed | bool | — | If set, confirms a newly logged in session ». |
Hash | int64 | yes | Session ID from the authorization constructor, fetchable using account getAuthorizations |
EncryptedRequestsDisabled | bool | — | Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed |
CallRequestsDisabled | bool | — | Whether to enable or disable receiving calls: if the flag is not set, the previous setting is not changed |
Returns
bool
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | HASH_INVALID | The provided hash is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.changeAuthorizationSettings#40f48462