Skip to main content
POST
Log in with Privy token

Body

application/json

JSON request payload for post.v1.auth.login.privy.

privy_token
string
required
wallet_proof
null | object

Proof of ownership of wallet_pubkey, obtained by signing the transaction returned from POST /v1/auth/privy/wallet-challenge. When supplied this satisfies the first-time binding ownership check without needing the Privy linked-accounts lookup.

wallet_pubkey
string | null

Optional Solana wallet pubkey the caller is asserting ownership of. For first-time bindings ownership must be proved either by including wallet_proof (a Solana memo transaction signed by the wallet — works for Ledger which cannot sign off-chain messages) or, absent a proof, by Privy's linked_accounts API confirming the wallet is linked to the authenticated user. An unverified pubkey is rejected with wallet_not_linked. For returning users, if supplied, it must match the bound pubkey. If omitted when no mapping exists, login still succeeds but the issued token will not carry a wallet claim and so cannot satisfy user-scoped authorization.

Response

Phoenix JWT pair issued

access_token
string
required
expires_in
integer<int64>
required
Required range: x >= 0
pop_key
string
required
refresh_expires_in
integer<int64>
required
Required range: x >= 0
refresh_token
string
required
token_type
string
required