Layer 224
AccountToggleUsername
Activate or deactivate a purchased fragment. com username associated to the currently logged-in user.
method
Users
account.toggleUsername#58d6b376 username:string active:Bool = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Username | string | Username |
| Active | Bool | Whether to activate or deactivate it |
Returns
BoolGogram Example
// AccountToggleUsername - positional arguments result, err := client.AccountToggleUsername("Hello, World!", true) if err != nil { // handle error } // result is *tg.Bool
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | USERNAMES_ACTIVE_TOO_MUCH | The maximum number of active usernames was reached. |
| 400 | USERNAME_INVALID | The provided username is not valid. |
| 400 | USERNAME_NOT_MODIFIED | The username was not modified. |