Skip to content
Back

Error creating storage: AppwriteException: User (role: guests) missing scope (buckets.write)

  • 1
  • Web
Nisarg
15 Feb, 2025, 11:13

Error creating storage: AppwriteException: User (role: guests) missing scope (buckets.write) at async getOrCreateStorage (src\models\server\storageSetup.ts:11:12) at async middleware (src\middleware.ts:10:2) 9 | } catch (error) { 10 | try {

11 | await storage.createBucket( | ^ 12 | questionAttachmentBucket, 13 | questionAttachmentBucket, 14 | [ { code: 401, type: 'general_unauthorized_scope', response: { message: 'User (role: guests) missing scope (buckets.write)', code: 401, type: 'general_unauthorized_scope', version: '1.6.1' } } Error creating databases or collection AppwriteException: User (role: guests) missing scope (databases.write) at async getOrCreateDB (src\models\server\dbSetup.ts:15:6) at async middleware (src\middleware.ts:10:2) 13 | } catch (error) { 14 | try { 15 | await databases.create(db, db) | ^ 16 | console.log("database created") 17 | //create collections 18 | await Promise.all([ { code: 401, type: 'general_unauthorized_scope', response: { message: 'User (role: guests) missing scope (databases.write)', code: 401, type: 'general_unauthorized_scope', version: '1.6.1' } }

TL;DR
Developers are facing errors due to a missing scope (buckets.write) for the 'guests' role. The solution is to grant the necessary scope to the specific role to resolve the issue.
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