Hello, I'm facing a critical 401 Unauthorized error on my admin panel app and have exhausted all debugging options.
The Problem:
When my React app on localhost makes any request that requires an authenticated session (like account.get() or databases.createDocument()), it fails with a 401 Unauthorized error.
This happens even after a successful account.createEmailSession() call.
What I have verified (my setup is correct):
My Project ID (6863d2f000114af88d7f) and Endpoint (https://fra.cloud.appwrite.io/v1) are 100% correct in my SDK initialization.
I have a Web App platform with the Hostname correctly set to localhost. I have deleted and re-created it.
For databases.createDocument, the Users role has full Create, Read, Update, Delete permissions on the target collection. I have verified this with screenshots.
I have tried multiple browsers, Incognito Mode, and performed Hard Reload + Empty Cache.
The project was created from scratch using Vite.
The platform seems to not recognize my valid user session, always returning 401. This feels like a platform-level anomaly specific to my project. Can you please investigate? Thank you.
Is the email session is about creating user session with email and password?
Are you giving an ai genarated text?
Btw
If yes
Then it is createEmailPasswordSession
Yes, that's correct. My goal is to use account.createEmailSession(email, password) to log in my admin user.
However, any request to an account endpoint (like createEmailSession or get) from my app running on localhost is failing with a 401 Unauthorized error, even though my Project ID is correct and localhost is registered as a platform hostname.
Sorry(
This method does not exist afaik.
Use this
Just say what you have in mind and keep it short 😅.
My admin app on localhost gets a 401 Unauthorized error for any authenticated API request (like account.get() or databases.createDocument).
I have already verified 100% that my Project ID, Endpoint, localhost Platform, and all Permissions for the Users role are correct. The problem still happens in a brand new project and in different browsers.
It feels like a platform-level bug for my project. Project ID: 6863d2f000114af88d7f.
Most probably session is not created.
You are using createEmailSession but the correct method is createEmailPasswordSession
Try this if it helps
Recommended threads
- Apple OAuth2 settings auto-disable every...
Hello, I'm on Appwrite 1.8.1 at the moment. I'm using on prod Apple Oauth and it keeps disabling itself every night. I don't know where to look for the solutio...
- 1.9.5 Migration problem
1.9.5 migration problem after run migration command only openruntimes-executor
- Appwrite Sites deployment fails because ...
Appwrite Cloud Sites deployments are failing consistently for both GitHub and manual deployments. The build command completes successfully and packaging also c...