Unomi Node
1.0.1
1.0.1
  • Apache Unomi Node.js SDK
  • Contribute
  • API
    • Profile
      • Create
      • Delete
      • Get
      • Count
      • Existing Properties
      • All Properties
      • Sessions
      • Get by Single Property
      • Query
    • Rule
      • Create
      • Get
      • Get All
    • Segment
Powered by GitBook
On this page
  • Usage
  • Response
  • Real World Example

Was this helpful?

  1. API
  2. Profile

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);
  }
}
PreviousDeleteNextCount

Last updated 5 years ago

Was this helpful?