Skip to content
Back

Auth missing scope account

  • 0
  • Auth
  • Web
  • Cloud
Love-ken
9 Sep, 2025, 18:24

[500] GET /dashboard ReferenceError: user is not defined at _page (src/routes/dashboard/+page.svelte:24:2) at eval (.svelte-kit/generated/root.svelte:71:5) at _layout (src/routes/+layout.svelte:12:18) file:///Users/lovekenolustra/Desktop/WebApp/dola/node_modules/appwrite/dist/esm/sdk.js:692 throw new AppwriteException(data === null || data === void 0 ? void 0 : data.message, response.status, data === null || data === void 0 ? void 0 : data.type, responseText); ^

AppwriteException: User (role: guests) missing scopes (["account"]) at Client.<anonymous> (file:///Users/lovekenolustra/Desktop/WebApp/dola/node_modules/appwrite/dist/esm/sdk.js:692:23) at Generator.next (<anonymous>) at fulfilled (file:///Users/lovekenolustra/Desktop/WebApp/dola/node_modules/appwrite/dist/esm/sdk.js:19:58) at process.processTicksAndRejections (node:internal/process/task_queues:105:5) { code: 401, type: 'general_unauthorized_scope', response: '{"message":"User (role: guests) missing scopes (["account"])","code":401,"type":"general_unauthorized_scope","version":"1.8.0"}' }

TL;DR
Developers are encountering an error where the user is not defined due to missing scopes (["account"]). This results in a 401 error with a message indicating the user's role ('guests') lacks the necessary scopes. To resolve this, developers need to adjust the user's role permissions to include the required 'account' scope.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more