
appwrite.ts
TypeScript
const account = new Account(client);
export const appwrite = { account }
+page.server.ts
TypeScript
import { appwrite } from '$lib/appwrite';
export const load: PageServerLoad = async ({ locals }) => {
console.log("appwrite.account", await appwrite.account.get())
}
Error: AppwriteException: User (role: guests) missing scope (account) Why am I getting this error?
TL;DR
Title: Account Scope Error when Passing Account on Server
Error: AppwriteException: User (role: guests) missing scope (account)
Issue: The error occurs because the user role 'guests' does not have the necessary scope 'account' required to access the account information.
Solution: Grant the 'account' scope to the 'guests' role in the Appwrite dashboard or assign a different role with the 'account' scope to the user.Recommended threads
- Internal 500 Server Error
I don't have much information but I am unable to create anything on database, Auth users are creating but not able to fetch into database
- CORS + 401 Error with Appwrite Authentic...
I'm getting a CORS + 401 Error with Appwrite Authentication Access to fetch at 'https://cloud.appwrite.io/v1/account/sessions/email' from origin 'https://my-c...
- Exposing project id and endpoint on GitH...
Is it best practice to expose your project id and endpoint in your appwrite.js file when publishing an NextJS or Angular project. If you use a .env file, that i...
