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
- Next16 server side and client side
I want to use AppWrite in a Next.16 project. Following the documentation, I implemented server-side authentication using Node-AppWrite. Is it possible to make a...
- Custom domain verification failing
Im having trouble adding custom domain to my project with the domain verification failing within my project but in organization view its verified
- Facing this Exception User (role: guests...
After creating an OAuth2 session using createOAuth2Session in Appwrite, the session is created successfully in the cloud console, but when I try to fetch user d...