Create a verification session and exchange its result code.
Create a verification session
Creates a verification session and returns the widget URL to embed. This request has no body. Privy configures the data package (Contact or Identity), its data items, and the widget settings for each merchant at onboarding.
If the request times out, create a new session. The unused session expires automatically and is not charged.
Create a verification session › Responses
Verification session created
session_idUnique verification-session identifier.
session_urlWidget URL to load in an iframe or WebView.
expires_atTime at which the session expires. Use this value. A fixed session duration is not guaranteed.
Exchange a verification code
Exchanges the single-use code from the privy:success event for a
verified-data JWT. The code has a short lifetime of approximately five
minutes and requires the merchant API key.
This endpoint does not return the session status, and it does not
accept session_id. An expired or reused code returns 404 not_found
or 410 session_expired.
Exchange a verification code › Request Body
codeSingle-use code from privy:success.payload.exchange_code.
Exchange a verification code › Responses
Code exchanged for a verified-data token
session_ideventtokenPrivy-signed EdDSA verified-data JWT.
