Skip to main content
Once your application has successfully configured authentication settings, users can update and take actions with resources they own per the following flow.
1

Request a user key for a user

Make a request to the Privy API with the user’s access token to request a user key. If the token is valid per your configured authentication settings, Privy will return a time-bound user key that can be used to sign requests.
2

Sign the request with the user key

Given the returned user key, sign the request to update or take actions with a resource the user owns.
3

Pass the signature in request headers

Lastly, pass the signature from the user key in a privy-authorization-signature header for the request. Privy will verify the signature and execute the request only if the signature is valid.
Follow the guide below to learn how to request and use user keys from the Privy API.

Set the authorization context to use the user’s keypair

To exchange a user JWT for a signing key, pass user_jwts in the authorization context. The SDK requests the signing key and signs wallet requests automatically.
Wallet requests on the wallets owned by the user can now be made by passing in this newly created authorization context on the call to the PrivyClient.
Example: Sign a message with the user's wallet

Users enrolled in MFA

For users enrolled in MFA, use user_auth with user_jwt and an mfa_token from completed verification. This requires @privy-io/node version 0.38.0 or later.
Pass this context as authorization_context in wallet requests, as in the example above.