Rank 2: Process
This is the call from my NodeJS server to the SDK;
Votes
0
Replies
24
Participants
Unknown
Messages
25
Rank 2: Process
This is the call from my NodeJS server to the SDK;
Rank 2: Process
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 🧐
Rank 2: Process
You're right, this is the one from node-appwrite.users
Why are you using the account API?
Rank 2: Process
The user doesnt have a password, in this scenario, so cannot use "users"
I don't understand
Rank 2: Process
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?
Rank 2: Process
ideally, but i cant
I'm lost again...the users API doesn't require a password
Rank 2: Process
Checked the docs - and it does for Client, but not for Server - i hadnt noticed that subtlety and though I had to use account
Rank 2: Process
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?
Rank 2: Process
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()?
Rank 2: Process
the server handles web page, wss, and API so common services are pulled out, that's all
Rank 2: Process
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?
Rank 2: Process
Ignore the extra "s" - i hit the keyboard
Rank 2: Process
[CLOSED] updatePhone - NodeJS SDK - 400 response - Cloud Beta
So what was the problem in your nodejs server code?
Rank 2: Process
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