Back

Makes no sense

  • 0
  • Flutter
  • Auth
renderlux
22 Apr, 2024, 14:31

https://appwrite.io/docs/references/cloud/client-flutter/account#createPhoneSession

Document : "Sends the user an SMS with a secret key for creating a session. If the provided user ID has not be registered, a new user will be created. "

I'm using a user ID that is already registered but when I use it : "https://appwrite.io/docs/references/cloud/client-flutter/account#createPhoneSession" I get the following error

AppwriteException (AppwriteException: document_already_exists, Document with the requested ID already exists. Try again with a different ID or use ID.unique() to generate a unique ID. (409))

So you can not use a registered user to make phone seesion - why not?

I'm using Cloud and Flutter.

TL;DR
Document states that creating a session sends SMS to a user. When using a user ID that is already registered, an error occurs because the user already exists. This means a unique ID should be generated for new sessions.
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