Enabling a test account registers a set of test credentials (a hardcoded email or phone number
and OTP code). It does not create a Privy user record. The user record is created on the first
successful login with those credentials, just like any real user.
To use test accounts, the 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 an 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 shown on the User management > Authentication > Advanced page of the Dashboard. Arbitrary values cannot be substituted for XXXX/XXXXXX, and plus addressing cannot be used; the credentials from the Dashboard must be used exactly.
| phone | OTP (for either) | |
|---|---|---|
[email protected] | +1 555 555 XXXX | XXXXXX |
Depending on when the Privy app was created, a legacy test account may be enabled with the login
credentials
[email protected] or +1 555 555 5555. See the User management > Authentication >
Advanced page of the Privy Dashboard to determine if this is the case for the app.Testing login-only flows
If the app setsdisableSignup: true and the test account has never been used to log in, login
attempts fail with a user_does_not_exist error and the Account not found modal. This is
expected behavior: no Privy user record exists yet, so the login is treated the same as a real user
attempting to sign in without an existing account.
To test this flow, attempt login with the test credentials before completing a first login. To test a
successful login, complete one login with the test credentials first to create the user record.
Getting a test access token programmatically
The app can programmatically get an access token for its test account using thegetTestAccessToken method.

