Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.privy.io/llms.txt

Use this file to discover all available pages before exploring further.

Privy enables developers to create Guest accounts for users, so that users can immediately use your app without going through a login flow.Guest accounts are available in @privy-io/[email protected] and above.
Privy guest accounts have powerful features:
  • They are locally persisted, so guest users can leave and return to the same account on the same device.
  • They have fully functioning embedded wallets that can transact and mint on-chain.
  • They are upgradable to fully logged-in accounts by simply calling login().
  • They have stable user IDs that do not change once a user is fully logged in.
  • They can be logged out and deleted as needed.

Integration tips

  • Guest account creation: If a user is not logged in at all (via guest or normal user account), we recommend showing guest account creation and normal user login side-by-side.
    • e.g. a “Continue as Guest” button next to a “Login or Create Account” button. This is so users do not create guest accounts unintentionally when they mean to log in with an existing account.
  • Guest account upgrade: If a user is logged in as a guest, we recommend showing two options: upgrade or delete.
    • Upgrade guest account: When a guest upgrades to a full user, they must enter a new login credential. If they try to upgrade with a credential (e.g. email address) that already is associated with an existing account, they will see a “Could not link existing account” error message.
    • Delete guest account: If a guest prefers to use an existing account instead, they must delete their guest account first. We recommend surfacing a “delete” option explicitly so guests can opt-into abandoning their guest account in favor of an existing account.
  • You can make use of login and error callbacks to customize your desired behavior when a user upgrades out of guest-mode.

Please note

Guest accounts are valid for 30 days. If the guest does not upgrade to a full user account within 30 days, the guest session will expire.
  • User data and embedded wallets from guest sessions cannot be merged into an existing user account — guest accounts can only be upgraded into a new user account. If a guest user wants to log in with an existing account, you must delete the guest user session first.
  • Note that Telegram is not available as an upgrade login method for guest accounts.

Configure guest accounts

Enable guest accounts in the Privy Dashboard before implementing this feature.