I'm attempting to retrieve information about the currently authenticated user using a GraphQL query on the server. However, I'm encountering a "bad request" error with the message "(role: applications) missing scope (account)." This issue likely arises because I'm performing a server-side operation to fetch user account details, and Appwrite is unable to determine the specific user context for this operation. It seems that I need to include the JWT token from the client when making this query, but I never received a JWT token upon logging in.
I've noticed in documents there is a GraphQL query to create a JWT, but it doesn't specify the user(account) for whom the JWT is intended. This raises questions about how Appwrite determines which user(account) the JWT is associated with.
As mentioned in https://discord.com/channels/564160730845151244/1165520670252351551/1165727790163828966, the createJWT is not meant for authentication.
role: applications
means you're using an API key, which shouldn't be used with whatever api call you're making.
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...