Skip to main content
This guide gets the KYI widget running on your page. Your server mints a short-lived token, and your frontend opens the widget in a drawer. For what the widget does after it opens, see Verification flow.
KYI drawer open over a partner page.

The kyi scope, opened from a partner page.

Before you start

  • Credentials. Send your Bluprynt representative every origin that will embed the widget, including staging and local development (for example https://app.example.com and http://localhost:3000). You get back a partner ID and a SECRET_KEY. Store them as KYI_PARTNER_ID and KYI_SECRET_KEY on your server.
  • Runtime. generateToken() needs Node.js 18 or later. For other languages, see Access tokens.
  • Signed-in members. The token endpoint needs to know who’s asking, so it sits behind your own authentication.
1

Mint a token on your server

server.ts
Keep KYI_SECRET_KEY on the server. Take the user ID from your authenticated session: if your endpoint reads it from the request, anyone can open someone else’s verification.
2

Open the widget

Mint a fresh token every time you open the widget. The drawer slides in from the right, and it closes on the close button, a click outside it, or Escape.
app.ts
3

Pick a scope

Check it works

  1. Sign in to your app on an allowlisted origin and click your button.
  2. The drawer opens and shows Start here — two steps to your first verified asset. onReady logs Widget loaded.
  3. Close it. onClose fires and the next click opens a new drawer.
If the drawer stays empty, your origin isn’t allowlisted yet. See Errors and troubleshooting.

Next

Verification flow

Every screen, step by step.

Access tokens

Next.js, Flask and FastAPI endpoints.

Security

The checklist before going live.

Example: Claim this profile

A complete Next.js integration.