Layer 231
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
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

Gogram Example

// hash is Authorization.Hash from account.getAuthorizations
ok, err := client.AccountChangeAuthorizationSettings(false, sessionHash, true, false)
if err != nil {
	log.Fatal(err)
}
fmt.Println("secret chats disabled for that session:", ok)

Possible Errors

Code Type Description
400 HASH_INVALID The provided hash is invalid.