Skip to content

cpreid/mparticle-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node Client for mParticle's Profile

Allow this node client to manage auth token refreshes & abstract calls for MPID lookups, exposing a single method ProfileClient.getProfile(identities={}) that fetches a customer profile from mParticle.

Install via npm

$ npm install mparticle-profile

Usage

const MPProfile = require('mparticle-profile');
const MPProfileInstance = new MPProfile(); // see below for args

// somewhere in an async function
const profile = await MPProfileInstance.getProfile({email: "[email protected]"});

Constructor args

Either explicitly pass in your mP API credentials and identifiers or let the client read them from env vars.

constructor(args={
  identity_input_key       : process.env.mp_identity_input_key, 
  identity_input_secret    : process.env.mp_identity_input_secret, 
  profile_bearer_token     : process.env.mp_profile_bearer_token, 
  profile_api_client_id    : process.env.mp_profile_api_client_id, 
  profile_api_client_secret: process.env.mp_profile_api_client_secret, 
  org_id                   : process.env.mp_org_id, 
  acct_id                  : process.env.mp_acct_id, 
  workspace_id             : process.env.mp_workspace_id
})

About

Node client for mParticle's Profile API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published