Back

How do I create documents with an authenticated user?

  • 0
  • Web
  • Cloud
David
3 Dec, 2024, 22:47

My web app is supposed to allow users to create documents for as long as they're authenticated. The collection permissions are set to allow users to create. But Appwrite returns the following error below yet I don't want guests to create documents.

TypeScript
{
  code: 401,
  type: 'general_unauthorized_scope',
  response: {
    message: 'User (role: guests) missing scope (account)',
    code: 401,
    type: 'general_unauthorized_scope',
    version: '1.6.1'
  }
}
TL;DR
Developers want authenticated users to create documents in a web app but are facing a 401 error due to missing scope 'account' for guests. To resolve this, update the user role from guests to authenticated users with the necessary permissions.
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