Privy supports multiple ways to fetch and manage users in your application.
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the getUsers
method by passing in a user’s DID.
Use the getUser
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the getUser
method to get a single user by their Privy DID:
Use the getUsers
method to get a list of all your users:
The getUsers
method automatically handles pagination and includes built-in exponential backoff to manage rate limits.
By email address
Use the getUserByEmail
method to get a user by their email address:
By phone number
Use the getUserByPhoneNumber
method to get a user by their phone number:
By wallet address
Use the getUserByWalletAddress
method to get a user by their wallet address:
By smart wallet address
Use the getUserBySmartWalletAddress
method to get a user by their smart wallet address:
By custom auth ID
Use the getUserByCustomAuthId
method to get a user by their custom auth ID:
By Farcaster fid
Use the getUserByFarcasterId
method to get a user by their Farcaster fid:
By Twitter subject
Use the getUserByTwitterSubject
method to get a user by their Twitter subject:
By Twitter username
Use the getUserByTwitterUsername
method to get a user by their Twitter username:
By Discord username
Use the getUserByDiscordUsername
method to get a user by their Discord username:
By Telegram User ID
Use the getUserByTelegramUserId
method to get a user by their Telegram User ID:
By Telegram username
Use the getUserByTelegramUsername
method to get a user by their Telegram username:
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the getUsers
method by passing in a user’s DID.
Use the getUser
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the getUser
method to get a single user by their Privy DID:
Use the getUsers
method to get a list of all your users:
The getUsers
method automatically handles pagination and includes built-in exponential backoff to manage rate limits.
By email address
Use the getUserByEmail
method to get a user by their email address:
By phone number
Use the getUserByPhoneNumber
method to get a user by their phone number:
By wallet address
Use the getUserByWalletAddress
method to get a user by their wallet address:
By smart wallet address
Use the getUserBySmartWalletAddress
method to get a user by their smart wallet address:
By custom auth ID
Use the getUserByCustomAuthId
method to get a user by their custom auth ID:
By Farcaster fid
Use the getUserByFarcasterId
method to get a user by their Farcaster fid:
By Twitter subject
Use the getUserByTwitterSubject
method to get a user by their Twitter subject:
By Twitter username
Use the getUserByTwitterUsername
method to get a user by their Twitter username:
By Discord username
Use the getUserByDiscordUsername
method to get a user by their Discord username:
By Telegram User ID
Use the getUserByTelegramUserId
method to get a user by their Telegram User ID:
By Telegram username
Use the getUserByTelegramUsername
method to get a user by their Telegram username:
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the get
method by passing in a user’s DID.
Use the get_by_id_token
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the get
method to get a single user by their Privy DID:
Use the list
method to get a list of all your users:
The list
method automatically handles pagination.
By email address
Use the get_by_email_address
method to get a user by their email address:
By wallet address
Use the get_by_wallet_address
method to get a user by their wallet address:
By custom auth ID
Use the get_by_jwt_subject_id
method to get a user by their custom auth ID:
To get a user by their Privy DID, make a GET
request to:
The user’s Privy DID (e.g., did:privy:XXXXXX
).
To get all users for your app, make a GET
request to:
Cursor for pagination. Use the next_cursor
from the previous response.
Number of users to return per request. Defaults to 100.
The response will include:
data
: Array of user objectsnext_cursor
: Cursor to use for the next batch of usersBy email address
By phone number
By wallet address
By smart wallet address
By custom auth ID
By Farcaster fid
By Twitter subject
By Twitter username
By Discord username
By Telegram User ID
Privy supports multiple ways to fetch and manage users in your application.
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the getUsers
method by passing in a user’s DID.
Use the getUser
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the getUser
method to get a single user by their Privy DID:
Use the getUsers
method to get a list of all your users:
The getUsers
method automatically handles pagination and includes built-in exponential backoff to manage rate limits.
By email address
Use the getUserByEmail
method to get a user by their email address:
By phone number
Use the getUserByPhoneNumber
method to get a user by their phone number:
By wallet address
Use the getUserByWalletAddress
method to get a user by their wallet address:
By smart wallet address
Use the getUserBySmartWalletAddress
method to get a user by their smart wallet address:
By custom auth ID
Use the getUserByCustomAuthId
method to get a user by their custom auth ID:
By Farcaster fid
Use the getUserByFarcasterId
method to get a user by their Farcaster fid:
By Twitter subject
Use the getUserByTwitterSubject
method to get a user by their Twitter subject:
By Twitter username
Use the getUserByTwitterUsername
method to get a user by their Twitter username:
By Discord username
Use the getUserByDiscordUsername
method to get a user by their Discord username:
By Telegram User ID
Use the getUserByTelegramUserId
method to get a user by their Telegram User ID:
By Telegram username
Use the getUserByTelegramUsername
method to get a user by their Telegram username:
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the getUsers
method by passing in a user’s DID.
Use the getUser
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the getUser
method to get a single user by their Privy DID:
Use the getUsers
method to get a list of all your users:
The getUsers
method automatically handles pagination and includes built-in exponential backoff to manage rate limits.
By email address
Use the getUserByEmail
method to get a user by their email address:
By phone number
Use the getUserByPhoneNumber
method to get a user by their phone number:
By wallet address
Use the getUserByWalletAddress
method to get a user by their wallet address:
By smart wallet address
Use the getUserBySmartWalletAddress
method to get a user by their smart wallet address:
By custom auth ID
Use the getUserByCustomAuthId
method to get a user by their custom auth ID:
By Farcaster fid
Use the getUserByFarcasterId
method to get a user by their Farcaster fid:
By Twitter subject
Use the getUserByTwitterSubject
method to get a user by their Twitter subject:
By Twitter username
Use the getUserByTwitterUsername
method to get a user by their Twitter username:
By Discord username
Use the getUserByDiscordUsername
method to get a user by their Discord username:
By Telegram User ID
Use the getUserByTelegramUserId
method to get a user by their Telegram User ID:
By Telegram username
Use the getUserByTelegramUsername
method to get a user by their Telegram username:
Using identity tokens is the recommended way to query user information about authenticated users in your backend. If you need user data about unauthenticated users, you can use the get
method by passing in a user’s DID.
Use the get_by_id_token
method to get a single user by their identity token passed from the client, to learn more about identity tokens, see identity tokens.
Privy rate limits REST API endpoints that you may call from your server. If you’re looking to get information about an authenticated user, consider using identity tokens as a more secure and efficient way to access user data.
Use the get
method to get a single user by their Privy DID:
Use the list
method to get a list of all your users:
The list
method automatically handles pagination.
By email address
Use the get_by_email_address
method to get a user by their email address:
By wallet address
Use the get_by_wallet_address
method to get a user by their wallet address:
By custom auth ID
Use the get_by_jwt_subject_id
method to get a user by their custom auth ID:
To get a user by their Privy DID, make a GET
request to:
The user’s Privy DID (e.g., did:privy:XXXXXX
).
To get all users for your app, make a GET
request to:
Cursor for pagination. Use the next_cursor
from the previous response.
Number of users to return per request. Defaults to 100.
The response will include:
data
: Array of user objectsnext_cursor
: Cursor to use for the next batch of usersBy email address
By phone number
By wallet address
By smart wallet address
By custom auth ID
By Farcaster fid
By Twitter subject
By Twitter username
By Discord username
By Telegram User ID