@vonage/identity-insights
v1.1.5
Published
The Identity Insights API provides real-time access to a broad range of attributes related to the carrier, subscriber, or device associated with a phone number.
Maintainers
Keywords
Readme
Vonage Identity Insights SDK for Node.js
This is the Vonage Identity Insights SDK for Node.js for use with Vonage APIs. To use it you will need a Vonage account. Sign up for free at vonage.com.
For full API documentation refer to developer.vonage.com.
Installation
We recommend using this SDK as part of the overall @vonage/server-sdk package. Please see the main package for installation.
If you only need the Identity Insights API specifically, you may install this package directly.
With NPM
npm install @vonage/identity-insightsWith Yarn
yarn add @vonage/identity-insightsUsage
import { Auth } from "@vonage/auth";
import { IdentityInsights } from "@vonage/identity-insights";
const credentials = new Auth({
applicationId: "your-application-id",
privateKey: "/path/to/your/private.key",
});
const options = {};
const clientInsights = new IdentityInsights(credentials, options);
const params = {
phoneNumber: "14040000000",
purpose: "FraudPreventionAndDetection",
insights: {
format: {},
originalCarrier: {},
currentCarrier: {},
simSwap: {
period: 240
},
},
};
const resp = await clientInsights.getIdentityInsights(params);Promises
Most methods that interact with the Vonage API uses Promises. You can either resolve these yourself, or use await to wait for a response.
const params = {
phoneNumber: "14040000000",
purpose: "FraudPreventionAndDetection",
insights: {
format: {},
originalCarrier: {},
currentCarrier: {},
simSwap: {
period: 240
},
},
};
const resp = await clientInsights.getIdentityInsights(params);Debugging
Run your script as follows:
DEBUG=vonage:server-client node your-script.jsTesting
Run:
npm run testInsights Release Status
The Identity Insights API supports different insights, and from time to time, we will add new channels or update the existing ones. Each insight follows our normal product development cycle, that is:
Developer Preview -> Alpha -> Beta -> GA
As a result, different insights within the API may be at different release stages at any given time. This table details the current release status of each insight implemented in this SDK:
| Insight | API Release Status | |-----------------------|:--------------------:| | Format | GA | | SIM Swap | GA | | Original Carrier | GA | | Current Carrier | GA | | Subscriber Match | Alpha | | Location Verification | Developer Preview | | Roaming | Developer Preview | | Reachability | Developer Preview |
Note: All statuses prior to GA are subject to regular updates, which may include breaking changes.
