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
- Error When load the website
Hi, I am getting this error whenever I reload my website please help me, I am using react Error: ** GET https://cloud.appwrite.io/v1/account 401 (Unauthoriz...
- Migrate from cloud to localhost
Hello everyone. I need to migrate my test project from cloud to localhost, however it seems that this is possible only if a self-hosted appwrite instance it's h...
- Current User is Not authorized
recreating same Thread