Skip to content
Back

Error getting session: AppwriteException: User (role: guests) missing scope (account)

  • 0
  • Auth
  • Web
  • Cloud
byPixelTV
15 Jul, 2025, 12:48

I get this error Error getting session: AppwriteException: User (role: guests) missing scope (account) when running in prod. As soon as I try running my app on my domain, I get this error when trying to login. This is the relevant code https://github.com/byPixelTV/bypixel.dev/blob/main/src/components/auth/AuthSuccessContent.tsx. Everything works fine on localhost, but not when running on my domain or another server in general

TL;DR
Error message `User (role: guests) missing scope (account)` occurs only in production, not in localhost. The issue is likely related to a permission problem with the user roles in the Appwrite SDK. Check the user roles and ensure they have the necessary permissions for accessing the account scope. Review the permissions and scopes set for the 'guests' role. This error can be fixed by adjusting the permissions for the role to include the required 'account' scope.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more