pasbydocs
API reference

Identification

POST endpoints for same-device, different-device, and wildcard identification.

Base path: /api/v2/identification · Billing: authentication

POST /api/v2/identification/same-device

Headers: x-api-key, x-access-secret

FieldTypeRequired
payloadstringYes
actionstringYes — login, signup, link
claimsstring[]Yes
curl -sS -X POST "https://s.pasby.africa/api/v2/identification/same-device" \
  -H "x-api-key: bk-test_YOUR_KEY" \
  -H "x-access-secret: YOUR_APP_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "payload": "session-abc-123",
    "action": "login",
    "claims": ["naming.given", "naming.family", "contact.email"]
  }'

POST /api/v2/identification/different-device

Headers: x-api-key, x-access-secret

FieldTypeRequired
userstringYes — NIN, min 11 chars
payloadstringYes
actionstringYes
claimsstring[]Yes

Response may set x-access-token when the backend returns a token in data.

POST /api/v2/identification/wildcard

Headers: x-api-key

FieldTypeRequired
payloadstringYes
actionstringYes
seedsnumberYes — 1–10
claimsstring[]Yes

Non-existent identity

If user (NIN) is not registered with pasby, different-device may return HTTP 400 with validation errors. Handle in UI and offer signup or wildcard flows.

TypeScript SDK

import { Pasby } from "@finsel-dgi/pasby";

const pasby = new Pasby({ apikeyAuth: "…", appSecretKey: "…", basePath: "https://s.pasby.africa" });

await pasby.identification.sameDevice({ action: "login", claims: ["naming.given"], payload: "…" });
await pasby.identification.differentDevice({ action: "login", user: "12345678901", claims: ["…"], payload: "…" });
await pasby.identification.wildcard({ action: "signup", seeds: 4, claims: ["…"], payload: "…" });

See TypeScript / Node.js SDK.

Guides

Full request/response walkthroughs: Identification guide.

Legacy v1

Mirror paths under /api/v1/identification/:

Suffixv1 headers
same-devicex-api-key, x-access-secret
different-devicex-api-key, x-access-token
wildcardx-api-key, x-access-token (recommended)

Responses echo version: "v1". See Migration.

On this page