To use these test accounts, your app must support email or SMS login. Testing other login flows
can either be automated with a library like Playwright, or by
completing the flow manually, as it requires authorization with other APIs (such as social
providers).
Enabling test accounts
To enable a test account for your app and get its login credentials:- Go to the User management > Authentication > Advanced tab of the Privy Dashboard
- Turn on the Enable test accounts toggle
XXXX/XXXXXX in the credentials below should be substituted with the values you see in the User management > Authentication > Advanced page of the Dashboard. You cannot substitute arbitrary values for XXXX/XXXXXX or use plus addressing; you must use the credentials from the Dashboard exactly.
| phone | OTP (for either) | |
|---|---|---|
[email protected] | +1 555 555 XXXX | XXXXXX |
Depending on when you created your Privy app, you may have a legacy test account enabled with the
login credentials
[email protected] or +1 555 555 5555. Please see the User management >
Authentication > Advanced page of the Privy Dashboard to determine if this is the case for your
app.Test accounts have a lighter authentication rate limit for apps in development. While all accounts
in production apps and non-test accounts in development apps are limited to 5 requests every 5
minutes for email and 5 requests every 10 minutes for SMS, test accounts in development apps are
limited to 10 requests every 10 seconds for either.
Getting a test access token programmatically
You can programmatically get an access token for your app’s test account using thegetTestAccessToken method:
Promise that resolves to an object containing the accessToken string for the test account.
getTestAccessToken will throw an error if:- You have not enabled test credentials in the Privy Dashboard
- Allowed origins or base domain are enabled for your app

