Layer 231
AccountCheckUsername
Validates a username and checks availability.
method
Users
account.checkUsername#2714d86c username:string = Bool;
Parameters
| Name | Type | Description |
|---|---|---|
| Username | string | username Accepted characters: A-z (case-insensitive), 0-9 and underscores. Length: 5-32 characters. |
Returns
BoolGogram Example
ok, err := client.AccountCheckUsername("gogram_dev") if err != nil { log.Fatal(err) } fmt.Println("username available:", ok)
Possible Errors
| Code | Type | Description |
|---|---|---|
| 400 | USERNAME_INVALID | The provided username is not valid. |
| 400 | USERNAME_OCCUPIED | The provided username is already occupied. |
| 400 | USERNAME_PURCHASE_AVAILABLE | The specified username can be purchased on https://fragment. com. |