REST API
Privy offers a simple REST API for managing your users and their account data from your backend. You can use this API to query your users' data, import users, delete users, configure an allowlist for your app, and more!
tip
To determine the appropriate request body and API route for your use case, check out the corresponding page in the REST API
section of our docs.
Configuring your requests
Whenever you make a request to Privy's API, you should always include the following request headers:
Authorization
: Basic Auth header with your Privy app ID as the username and your Privy app secret as the password'privy-app-id'
: your Privy app ID
Below is a sample headers
object that you may include on your requests to Privy's API (e.g. with axios
or fetch
):
headers: {
'Authorization': btoa('<your-privy-app-id>:<your-privy-app-secret>'),
'privy-app-id': '<your-privy-app-id>'
}
These request headers are consistent across all of our REST API endpoints. In contrast, the request body we expect will depend on the endpoint you're using.