Skip to main content

User Intel | Node.js SDK

User Intel

constructor(token: PangeaToken, config: PangeaConfig): UserIntelService

Creates a new UserIntelService with the given Pangea API token and configuration.

PangeaToken

Pangea API token.

Configuration.

UserIntelService
const config = new PangeaConfig({ domain: "pangea_domain" });
const userIntel = new UserIntelService("pangea_token", config);

Look up information about a specific breach

breach(request: BreachRequest): Promise<PangeaResponse<BreachResult>>

Given a provider specific breach ID, find details about the breach.

BreachRequest

Request to send to v1/breach endpoint

Promise<PangeaResponse<BreachResult>>
const response = await userIntel.breach({
 breach_id: "66111",
});

Look up breached passwords

passwordBreached(hashType: HashType, hashPrefix: string, options: BreachedOptions): Promise<PangeaResponse<BreachedResult>>

Determine if a password has been exposed in a security breach using a 5 character prefix of the password hash.

HashType

Hash type to be looked up

string

The prefix of the hash to be looked up.

An object of optional parameters. Parameters supported:

  • provider {String} - Use breached data from this provider: "spycloud". Default provider defined by the configuration.
  • verbose {Boolean} - Echo the API parameters in the response. Default: verbose=false.
  • raw {Boolean} - Include raw data from this provider. Default: raw=false.

Promise<PangeaResponse<BreachedResult>>
const response = await userIntel.passwordBreached(
  Intel.HashType.SHA256,
  "5baa6",
  {
    provider: "spycloud",
    verbose: true,
    raw: true
  }
);

Look up breached passwords V2

passwordBreachedBulk(hashType: HashType, hashPrefixes: string[], options: BreachedOptions): Promise<PangeaResponse<BreachedBulkResult>>

Find out if a password has been exposed in security breaches by providing a 5 character prefix of the password hash.

HashType

Hash type to be looked up

Array<string>

The list of prefixes of the hash to be looked up.

An object of optional parameters. Parameters supported:

  • provider {String} - Use breached data from this provider: "spycloud". Default provider defined by the configuration.
  • verbose {Boolean} - Echo the API parameters in the response. Default: verbose=false.
  • raw {Boolean} - Include raw data from this provider. Default: raw=false.

Promise<PangeaResponse<BreachedBulkResult>>
const response = await userIntel.passwordBreachedBulk(
  Intel.HashType.SHA256,
  ["5baa6"],
  {
    provider: "spycloud",
    verbose: true,
    raw: true
  }
);

Look up breached users

userBreached(request: BreachedRequest): Promise<PangeaResponse<BreachedResult>>

Determine if an email address, username, phone number, or IP address was exposed in a security breach.

BreachedRequest

Request to send to user/breached endpoint

Promise<PangeaResponse<BreachedResult>>
const response = await userIntel.userBreached({
  phone_number: "8005550123",
  verbose: true,
  raw: true,
});

Look up breached users V2

userBreachedBulk(request: BreachedBulkRequest): Promise<PangeaResponse<BreachedBulkResult>>

Determine if an email address, username, phone number, or IP address was exposed in a security breach.

BreachedBulkRequest

Request to send to user/breached endpoint

Promise<PangeaResponse<BreachedBulkResult>>
const response = await userIntel.userBreachedBulk({
  phone_numbers: ["8005550123"],
  verbose: true,
  raw: true,
});