Layer 220
method Users
account.changeAuthorizationSettings#40f48462 flags:# confirmed:flags.3?true hash:long encrypted_requests_disabled:flags.0?Bool call_requests_disabled:flags.1?Bool = Bool;

Parameters

Name Type Description
Flags # Flags, see TL conditional fields
Confirmed flags.3?true If set, confirms a newly logged in session.
Hash long Session ID from the authorization constructor, fetchable using account. get Authorizations
EncryptedRequestsDisabled flags.0?Bool Whether to enable or disable receiving encrypted chats: if the flag is not set, the previous setting is not changed
CallRequestsDisabled flags.1?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.

Gogram Example

// AccountChangeAuthorizationSettings - using Params struct
result, err := client.AccountChangeAuthorizationSettings(&tg.AccountChangeAuthorizationSettingsParams{
    Hash: int64(0),

    // Optional fields:
    // Confirmed: true,
    // EncryptedRequestsDisabled: true,
    // CallRequestsDisabled: true,
})
if err != nil {
    // handle error
}
// result is *tg.Bool