@identifyorg/node-sdk
v0.1.0
Published
IdentifyOrg server-side SDK for Node.js — identity verification, prepaid billing, and realtime call/chat token issuance.
Maintainers
Readme
@identifyorg/node-sdk
Server-side Node.js SDK for IdentifyOrg: BVN/NIN/FRSC verification, prepaid billing, and issuing realtime call/chat tokens for your frontend.
npm install @identifyorg/node-sdkconst { IdentifyOrgClient } = require("@identifyorg/node-sdk");
const identifyorg = new IdentifyOrgClient({ apiKey: process.env.IDENTIFYORG_SECRET_KEY });
// Identity verification
const result = await identifyorg.verify.bvn(
{ bvn: "22212345678", first_name: "Ada", last_name: "Okafor" },
{ idempotencyKey: "order-123" } // safe retries, no double-charge
);
// Top up credit
const topup = await identifyorg.payments.topup({ amount: 5000 });
console.log(topup.checkout_url); // send the customer here
// Mint a realtime token for YOUR user, then hand it to the browser/mobile
// client (IdentifyOrg JS/React Native/Flutter/Kotlin SDK) — never send your
// secret key to a client.
const callToken = await identifyorg.streaming.token("video", {
identity: req.user.id,
display_name: req.user.name,
});
res.json({ token: callToken.token, url: callToken.url, roomName: callToken.room_name });
const chatToken = await identifyorg.chat.token({
visitor_id: visitor.id,
visitor_name: visitor.name,
});API surface
verify.bvn/nin/frsc(payload, { idempotencyKey })streaming.token(type, payload)—typeis"video" | "voice" | "stream"streaming.sessions(params)chat.token(payload)payments.topup(payload),payments.list(params)usage(params),transactions(params),pricing(),balance()
All methods return the parsed JSON body and throw IdentifyOrgApiError (with
.status and .code) on non-2xx responses.
Environment variables
Set IDENTIFYORG_SECRET_KEY (never commit it) and optionally VERALINK_BASE_URL
if you're pointed at a self-hosted or staging deployment.
