Get

Get a Profile given a specific profile ID.

Usage

unomi.profile.get(<string | number>);

Response

{
  success: <boolean>,
  status: <number>,
  data: <object>
}

Real World Example

async function greetProfile(profileID) {
  try {
    const profile = await unomi.profile.get(profileID);
    console.log(`Hello ${profile.data.firstName}!`);
  } catch (err) {
    console.error("An error occurred while getting the profile " + profileID);
    console.error(err);
  }
}

Last updated