Technical Reference
Usernames
Introduction
Usernames are ENS-compatible identifiers for every World App user, ensuring consistency and easy recognition. For example, when displaying transaction history, show the username instead of the wallet address to make it more user-friendly and private.
The usernames service is public, docs can be found here. This will be mostly useful for more advanced use cases.
How to get it
To get the user's username you can either complete Wallet Auth and access the username/profile picture url from MiniKit directly:
const username = MiniKit.user.username
Or you can request it manually, using the getUserByAddress
method on MiniKit:
const worldIdUser = await MiniKit.getUserByAddress(userAddress)
Other ways involve querying the usernames service.