Guides

UsernamesUSER-ONLY

User Walkthrough 12 of 50

Users can check and manage the account’s usernames.

With hideUsernames, you can hide every collectible username at once.

Checking a Username

checkUsername reports whether a username is available.

const isAvailable = await client.checkUsername("example_username");

console.log(isAvailable);

Setting a Username

setUsername lets you set the account’s username.

await client.setUsername("example_username");

Showing a Username

To show a username on the account’s profile, call showUsername.

await client.showUsername("me", "example_username");

Hiding a Username

With hideUsername, you can hide a username from the account’s profile.

await client.hideUsername("me", "example_username");

Reordering Usernames

reorderUsernames changes the order of the account’s usernames.

await client.reorderUsernames("me", ["primary_username", "example_username"]);

Removing a Username

removeUsername lets you remove the account’s username.

await client.removeUsername();