What USERNAME_INVALID means
The error comes up when an account searches for someone by username, or tries to set a username for itself that does not follow Telegram's rules.
Username rules
- Only Latin letters, digits and underscores.
- A regular username is 5 to 32 characters long.
- No spaces, dots, hyphens or Cyrillic.
Why it happens
- Extra characters got into your list: a space, quotes, a dot at the end.
- A person's name or a channel title was pasted instead of a username.
- A t.me link was parsed wrongly, for example with a tail of parameters.
What to do
- Clean your list: keep only the names themselves, with no extra characters.
- For links like t.me/name, keep only the name.
- If you are setting a username for your own account, choose a name that follows the rules above.