getUser()
Gets a User by ID.
function getUser(userId: string): Promise<User>Parameters
userIdstringRequiredThe ID of the user to retrieve.
Usage
keyward is the backend client. Create it once with createKeywardClient({ secretKey }) and reuse it.
const user = await keyward.users.getUser("user_2f9a");
console.log(user.primaryEmail);Returns
A User, or throws KeywardError with status 404.
Updated
What did you think of this content?