This is the call from my NodeJS server to the SDK;
When I make the same call from the appwrite Function (which uses an older SDK) there's no error
This looks like account service/API rather than the user service/API π§
You're right, this is the one from node-appwrite.users
Why are you using the account API?
The user doesnt have a password, in this scenario, so cannot use "users"
I don't understand
oauth login - the user/session doesnt have a password, which is a required parameter for users.updatePhone
So you want to use the users API, right?
ideally, but i cant
I'm lost again...the users API doesn't require a password
Checked the docs - and it does for Client, but not for Server - i hadnt noticed that subtlety and though I had to use account
ignore that, I'm getting myself mixed up on the calls/ docs
Account API is used when you have a JWT token and you want to make requests on behalf of the user.
That said, there is a bug with the update phone API for users created using oauth2.
So this is your node server code that doesn't work? What exactly is appWrite and updatePhone?
appWrite is just an api wrapper
And I assume that users is the Appwrite Users service? And if you click into the implementation details of that updatePhone()?
the server handles web page, wss, and API so common services are pulled out, that's all
Implementation....
So it does look like it's number in the payload...but you said it was sending as phone?
I assume the extra S in that function name was added right before you send this screenshot?
Ignore the extra "s" - i hit the keyboard
[CLOSED] updatePhone - NodeJS SDK - 400 response - Cloud Beta
So what was the problem in your nodejs server code?
It seems you cannot update the phone number of an Anonymous account - error was you cannot update the phone number unless one has been set (which is a different issue, so closing this). The response error of number vs phone was my API server reporting the parameters it received, whereas it was supposed to be returning the error from appwrite
Recommended threads
- Local Serverless Function Testing: Are D...
I have followed the instructions to get the CLI working, and have been able to log-in, initialize my project, and created a simple Python function, which calls ...
- Update user email using OTP
Hi, I am trying to implement email update using OTP, there is not password associated with the account. One solution I found online is creating appwrite functio...
- Magic Link token automatically consumed
Hi, I'm using the Magic Link auth system with Appwrite Cloud and I'm running into huge issues getting users to log in successfully. About 9 times out of 10, th...