account.setGlobalPrivacySettings
Set global privacy settings
func (c *Client) AccountSetGlobalPrivacySettings(ctx context.Context, settings GlobalPrivacySettings) (*GlobalPrivacySettings, error)
Calling this method
client.Run(ctx, func(ctx context.Context) error {
api := client.API()
res, err := api.AccountSetGlobalPrivacySettings(ctx, settings)
if err != nil {
return err
}
_ = res // *GlobalPrivacySettings
return nil
})
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
Settings | GlobalPrivacySettings | yes | Global privacy settings |
Returns
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | AUTOARCHIVE_NOT_AVAILABLE | The autoarchive setting is not available at this time: please check the value of the autoarchive_setting_available field in client config » before calling this method. |
| 403 | BOT_ACCESS_FORBIDDEN | The specified method can be used over a business connection for some operations, but the specified query attempted an operation that is not allowed over a business connection. |
| 400 | BUSINESS_CONNECTION_INVALID | The connection_id passed to the wrapping invokeWithBusinessConnection call is invalid. |
| 403 | PREMIUM_ACCOUNT_REQUIRED | A premium account is required to execute this action. |
References
- Official documentation
- Generated Go reference
- TL definition:
account.setGlobalPrivacySettings#1edaaac2