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
- general_unauthorized_scope
localhost oauth not working. general_unauthorized_scope error showing. { "message": "User (role: guests) missing scopes ([\"account\"])", "code": 401, ...
- Anyone manage to get a slack-bot working...
I'm trying to setup a bot the send and retrieve slack messages to a chat in my site. I've failed with SSE and appwrite functions soo far... i'll trying polling ...
- [Sites] Deployment finished but site is ...
The deployment finished and is active but the site shows timeout error.