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
- How to Display File in Web?
I'm trying to use Appwrite's Storage to store images and display them in my app, however when I use the `getFileView`, `getFileDownload` or `getFilePreview` met...
- Project Paused Despite Daily Active Usag...
I noticed that my project was automatically **paused**, even though it is actively being used. The project is an **attendance application** that is used daily b...
- Sudden CORS Errors - Domain hasn't Chang...
I have an Appwrite project with two web apps configured, the first one has the hostname `*` and the second one I just added to test if it could fix the issue wi...