
I'm trying the to set up phone verification with flutter android app When using the createPhoneSession() method everything goes well ( the phone receives the 6 digits code )
But when verifying using updatePhoneVerification() method this error is thrown
Unhandled Exception: AppwriteException: user_invalid_token, Invalid token passed in the request. (401)
I do not understand because I passed the right userId and the right secret so what is the token mentinoned in the exception is related to ?
Thanks

Can you share the code?

For the updatePhoneVerification
function?

final r = await ref.read(appwriteAccountProvider).updatePhoneVerification(
userId: userId,
secret: secret,
);

My bad, in order to complete the createPhoneSession
flow you'll need to use updatePhoneSession
and not the updatePhoneVerification
Like so:
final r = await ref.read(appwriteAccountProvider).updatePhoneSession(
userId: userId,
secret: secret,
);


You wrote updatePhoneVerification() twice

Fixed

Thanks

Ok I'm going to test it

It works thanks

But there is a way to register like tests number ? To avoid sending messages during development stage

Good!

I don't think so, nope

🥹 no problem I'll try to set all things up before going beyond the limits

<:appwriteupvote:899677724615016528>

ah no, you can try using functions for that though and make testing folders different than your production folders
Recommended threads
- Vite build permission failed
im trying to deploy a react site using appwrite sites and it keeps failing to build ```2025-08-10T20:20:15.168371867Z [20:20:15] [open-runtimes] Environment pr...
- How to proper delete a serverless functi...
I tried `appwrite functions delete --function-id 12345`, it deletes the online one, but even after trying `appwrite pull functions`, the local one in the appwri...
- Do I have to manually change the endpoin...
The CLI never changes the json file, for example: ```bash appwrite client --endpoint https://url --project-id my-project --key standard_12345 ```` I do not k...
