Back

AppwriteExpection: general_unauthorized_scope,User (role:guest) missing scope (account) (401)

  • 0
  • Android
  • Flutter
  • Accounts
  • Cloud
Redemption
16 Oct, 2023, 20:56

Heys Guys, Over here I am trying to make an email verification process after the account is created but I'm getting this error-- AppwriteExpection: general_unauthorized_scope,User (role:guest) missing scope (account) (401) If I checked my console the user is created but not verified. I got this error when I tried to verify the email using the SDK account.createVerification.

appwrite SDK version:8.1.0 platform: flutter (android).

A quick help can save my confusion, cause I don't know what the problem is here. I have search other support questions which are similar but none matches my problem.

TL;DR
User is experiencing an Appwrite exception error when trying to verify an email after creating an account. The error message suggests that the user (role: guest) is missing the account scope. The user has already checked the console and confirmed that the user is created but not verified. They are using the Appwrite SDK version 8.1.0 in a Flutter app on Android. Solution: The user needs to create a session before attempting to verify the email. They should also ensure that the correct parameters are being passed to the `createEmailSession()` function.
Drake
17 Oct, 2023, 00:37

role:guest

This means you haven't logged in. create a session first

Drake
17 Oct, 2023, 00:38

Also, you're passing incorrect params to createEmailSession(). Look at the function signature

Redemption
17 Oct, 2023, 05:39

But shouldn't the email be verified first before login.

Redemption
17 Oct, 2023, 05:44

I was previously making use of the create function and it will create the user. When I couldn't verify the user email I thought to switch to this

Guille
17 Oct, 2023, 11:58

Fix the incorrect params, and try again. Try to share the full login code to help you

Drake
18 Oct, 2023, 00:35

no. it is perfectly fine for a user to log in without a verified email

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