
getting the following response //verification response { "message": "User (role: guests) missing scope (account)", "code": 401, "type": "general_unauthorized_scope", "version": "1.6.1" } when trying account.createverification commenting out createverification funtion,everything works fine

verify-email/page.tsx

I believe after creating the account you need to create a session, once that session is established you can send verification.

So right now, the issue is that there is no session set in the instance. So it is effectively a "guest"

how can i wait for the session

wym?

I guess what I would do would be do something like this
- Create Account
- Create Session based on credentials passed to create account
This will navigate you to a session success route. You can then call the create verification function. Or you can set a banned at the top of the page saying your email hasn't been verified, click here to verify.

thank you ,trying it out, u save my whole week :appwriteheart:

Oh, actually, I'm seeing here createEmailPasswordSession does not have a redirect so you could do
const email = "email@email.com"
const password = "Password1!"
const username = "Kenny"
await account.create(
ID.unique(),
email,
password,
username
);
await account.createEmailPasswordSession(
email,
password
);
await account.createVerification(
'https://locahost:3000/verify-email'
);

added a createEmailPasswordSession as u instructed boss, now its working!:appwriteheart: tysm

Sweet! Glad you got that figured out.

[SOLVED] createverification not working
Recommended threads
- Stuck at pinging the server to finish ad...
I'm not using the starter app and I'm not sure how to finish connecting my app to Appwrite.io. Is there a CURL command I can run to finish setup?
- 500 internal error
I get a 500 internal error when trying to access my database on appwrite cloud. Sometimes it would start working but this time it never corrects.
- Error getting session: AppwriteException...
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 o...
