
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
- Email Verification Email
Hi everyone, I’m currently experiencing an issue with the email verification functionality. When I trigger the verification, the request returns a valid respon...
- Appwrite Cloud Custom Domains Issue
I’m trying to configure my custom domain api.kondri.lt (CNAME pointing to appwrite.network., also tried fra.cloud.appwrite.io with no luck ) but encountering a ...
- OpenAI Whisper on Appwrite Sites
Hey guys, just wondering if I can serve an OpenAI Whisper AI on appwrite / appwrite sites. tiny model is like ~40-50MB
