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
- Query Appwrite
Hello, I have a question regarding Queries in Appwrite. If I have a string "YYYY-MM", how can I query the $createdAt column to match this filter?
- Different appwrite IDs are getting expos...
File_URL_FORMAT= https://cloud.appwrite.io/v1/storage/buckets/[BUCKET_ID]/files/[FILE_ID]/preview?project=[PROJECT_ID] I'm trying to access files in my web app...
- Invalid document structure: missing requ...
I just pick up my code that's working a week ago, and now I got this error: ``` code: 400, type: 'document_invalid_structure', response: { message: 'Inv...