UsernamesUSER-ONLY
User Walkthrough 13 of 18
User clients can check and manage the account’s usernames.
Checking a Username
Use checkUsername to check whether a username is available.
const isAvailable = await client.checkUsername("example_username");
console.log(isAvailable);
Setting a Username
Use setUsername to set the account’s username.
await client.setUsername("example_username");
Showing a Username
Use showUsername to show a username on the account’s profile.
await client.showUsername("me", "example_username");
Hiding a Username
Use hideUsername to hide a username from the account’s profile.
await client.hideUsername("me", "example_username");
Reordering Usernames
Use reorderUsernames to change the order of the account’s usernames.
await client.reorderUsernames("me", ["primary_username", "example_username"]);
Removing a Username
Use removeUsername to remove the account’s username.
await client.removeUsername();