
Hi, my app uses only phone number based OTP authentication. As far as I know, appwrite creates a new user if a user is not present with that phone number. And I want the client to get an error if the phone number they gave is already registered. Is there a way to achieve this in appwrite?

If phone number is new then Appwrite will create new user else it will just create new session, so you can’t directly check this from client SDK.
you can use functions with server API to check if user with phone already exists or not. And you can call function using client SDK.
Recommended threads
- Upgrade Issue
Am having issue upgrading my appwrite account to pro as my card number is 19 and the required input is 16 digit
- createEmailPasswordSession Error using S...
Did someone succeed using SSR approach for login?
- Trying to Figure out how to delete a use...
If i have a button in an app that allows a user to delete their account, can I not just call a function from my swift app to Appwrite to have the account delete...
