Get a User

Gets a User by ID, Email or Username.

Method Signature

get(id: string): Promise<User>;
get(id: string, callback: (err?: Error, user: User) => any): void;

Parameters

ParameterTypeDescription
idstringThe id, email, or username of the User to get
callback(err?: Error, user: User) => anyOptional The callback
returnsUserThe requested User

Example

/*
 * This example demonstrates getting a User by Email
 */
const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

const alice = await catalytic.users.get('[email protected]');