Skip to content
Back

[SOLVED] Appwrite Function getting general_unauthorized_scope (databases.read) while creating db

  • 0
  • Resolved
  • 2
  • Functions
  • Cloud
Ankit Maniya
8 Apr, 2026, 18:53

Hi everyone,

I'm trying to create a database schema using an Appwrite Function written in Dart from Appwrite console, but I'm getting an authorization error when the function runs.

TypeScript
Dart version: 3.5.1
dart_appwrite: 13.0.0```
```Error:
request.path :: /create_database_schema
Native logs detected. Use context.log() or context.error() for better experience.
Error while checking or creating database: AppwriteException: general_unauthorized_scope, User (role: guests) missing scopes (["databases.read"]) (401)```
TL;DR
Appwrite function was getting an error related to unauthorized scope while creating a database due to running as a guest without an API key. Issue resolved by adding the API key to the Appwrite client.
Ankit Maniya
8 Apr, 2026, 18:56

Is there anyway I can assign permission to Database as we are assigning to tables?

8 Apr, 2026, 20:14

[SOLVED] Appwrite Function getting general_unauthorized_scope (databases.read) while creating db

Your function runs as a guest because Appwrite client inside it has no api key

1
9 Apr, 2026, 19:36

Yes I figured it out, thank you for your response.

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