Appearance
Getting the allowlist
Privy allows you to easily get the current allowlist for your app.
Using @privy-io/server-auth
Use the PrivyClient
's getAllowlist
method to get your app's current allowlist. Pass no parameters to this method.
tsx
const allowlistEntry = await privy.getAllowlist();
If the request is successful, the method will return an array of AllowlistEntry
objects. These include a type
describing the type of entry ('email'
, 'phone'
, or 'wallet'
) and a value
with the corresponding account identifier (e.g. the email address).
Using the REST API
Make a GET
request to:
https://auth.privy.io/api/v1/apps/<your-privy-app-id>/allowlist
Below is a sample cURL command for getting your current allowlist:
bash
curl --request GET 'https://auth.privy.io/api/v1/apps/<your-privy-app-id>/allowlist' \
-u "<your-privy-app-id>:<your-privy-app-secret>" \
-H "privy-app-id: <your-privy-app-id>"
A successful response will include an array of your current allowlist entries, like below:
json
[
{
"id": "allowlist-entry-ID",
"type": "wallet",
"value": "0xab5801a7d398351b8be11c439e05c5b3259aec9b",
"appId": "your-privy-app-ID"
},
{
"id": "allowlist-entry-ID",
"type": "email",
"value": "[email protected]",
"appId": "your-privy-app-ID"
},
...
]