
My other api's like getting documents and adding are working fine, but this one gives 400 bad gateway error. Am i missing something? I have tried clearing browser cookies but no change

You code looks intact
What are the details of the error you're getting?
Also just to be sure you're trying to login or to create the user?
Because if it's to create then you need to use the create
method

browser-ponyfill.js:518 POST http://localhost/v1/account/sessions/email 400 (Bad Request) (anonymous) @ browser-ponyfill.js:518 fetch @ browser-ponyfill.js:455 (anonymous) @ client.ts:408 (anonymous) @ tslib.es6.js:76 __awaiter @ tslib.es6.js:72 call @ client.ts:361 (anonymous) @ account.ts:524 (anonymous) @ tslib.es6.js:76 __awaiter @ tslib.es6.js:72 createEmailSession @ account.ts:503 createSession @ api.js:30 handleSubmit @ Login.jsx:30 callCallback @ react-dom.development.js:4157 invokeGuardedCallbackDev @ react-dom.development.js:4206 invokeGuardedCallback @ react-dom.development.js:4270 invokeGuardedCallbackAndCatchFirstError @ react-dom.development.js:4284 executeDispatch @ react-dom.development.js:9011 processDispatchQueueItemsInOrder @ react-dom.development.js:9043 processDispatchQueue @ react-dom.development.js:9056 dispatchEventsForPlugins @ react-dom.development.js:9067 (anonymous) @ react-dom.development.js:9258 batchedUpdates$1 @ react-dom.development.js:25979 batchedUpdates @ react-dom.development.js:3984 dispatchEventForPluginEventSystem @ react-dom.development.js:9257 dispatchEvent @ react-dom.development.js:6435 dispatchDiscreteEvent @ react-dom.development.js:6410

Iam tring to login user

Sorry, I meant in the network tab What are you getting from the server?

Sorry iam new to development, This is the error message in google console. There is no other error as far as i know

Like here if you have any

Sure thing, Go to the network tab Then click on the request you are sending Then go to preview and take a screenshot


Good Now run the login request again and you will have it added to the list When it's added click on it Then click on preview Take screen shot of that

Like this


OK So it doesn't return any data then Let me think for a minute

OK, I got it

I think

Error 400 means that one of the data you've enter are invalid And it seems like the password field should be at least 8 characters So try with 8+ characters and let me know

Oh completely forgot about it

It worked

Great

Thank you for being paitent with me

👍
Recommended threads
- 25 document limit
Unable to bypass the 25 document limit: https://github.com/Mooshieblob1/GenerateImagesPreview
- cant get custom domain to work with appw...
Hi, how do I get a custom domain to work? I have set database.vrtuhub.com on the appwrite console as a custom domain and did the cname record for it bit i still...
- [SOLVED] Consfusing Pricing
Why the pricing is showing me to 30 dollar while the original pricing which is 15 dollar per month,it is also including the add ons pricing,which i donot know w...
