Deleting users
Privy allows you to delete users via their Privy user ID. This is a destructive action: if the user logs into your app again, they will have a new user ID, will create a new embedded wallet address, and will have to relink any formerly linked accounts.
Please take extreme care when deleting users. For security of user assets, Privy does not delete the embedded wallet, and instead “soft deletes” it by disassociating it from the deleted user and archiving the data. If the user still has access to their login method, their wallet can be recovered after deletion. Reprovisioning a deleted wallet involves a support process, so please take care to only delete users that you intend to delete.
Use the PrivyClient
’s deleteUser
method to delete a user. As a parameter, pass the user’s Privy DID as a string
:
Complete Example
This method will throw an error if the deletion operation failed (e.g. due to an invalid Privy DID).
Use the PrivyClient
’s deleteUser
method to delete a user. As a parameter, pass the user’s Privy DID as a string
:
Complete Example
This method will throw an error if the deletion operation failed (e.g. due to an invalid Privy DID).
Make a DELETE
request to:
Replace <did>
with your user’s Privy DID. It should have the format did:privy:XXXXXX
.
Request
Use your Privy app ID as the username and your Privy app secret as the password.
Example
Below is a sample cURL command for deleting the user object associated with a Privy DID:
Response
The Privy Dashboard provides a simple interface to delete users when necessary.
Steps to delete a user
- Log in to the Privy Dashboard
- Navigate to the Users page for your app
- Search for the user you wish to delete
- Click on the user to open the user drawer
- Scroll to the bottom of the user drawer
- Click the Delete User button
- Confirm the deletion in the confirmation dialog
This action cannot be undone. Once a user is deleted:
- If they log in again, they will get a new DID
- They will need to relink any accounts
- They will get a new embedded wallet address
- Any data associated with their previous DID will be inaccessible