I have a very weird error;
In a function I'm using dynamic keys to perform read write operation in rows. I have the scopes for read and write rows.
The function perform successfully listRows at the beginning of the function, but later in the code I have a table holidays with a date and description fields
The previous read are nothing special and it doesn't too much time to read information
Without any permission in the table I get this error
appwrite | [Error]Line: 6732
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/tablesdb/:databaseId/tables/:tableId/rows
appwrite | [Error] Type: Utopia\Database\Exception\Authorization
appwrite | [Error] Message: No permissions provided for action 'read'
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
If in the table I add users:read I got this error:
appwrite | [Error] Line: 6732
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/tablesdb/:databaseId/tables/:tableId/rows
appwrite | [Error] Type: Utopia\Database\Exception\Authorization
appwrite | [Error] Message: Missing "read" permission for role "users". Only "["any","guests"]" scopes are allowed and "["users"]" was given.
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
If I add any:read
appwrite | [Error] Line: 184
appwrite | [Error] Method: POST
appwrite | [Error] URL: /v1/tablesdb/:databaseId/tables/:tableId/rows
appwrite | [Error] Type: Appwrite\Extend\Exception
appwrite | [Error] Message: The current user or API key does not have the required scopes to access the requested resource.
appwrite | [Error] File: /usr/src/code/src/Appwrite/Platform/Modules/Databases/Http/Databases/Collections/Documents/Create.php
I'm out of ideas to debug this error
I'm using:
Appwrite: 1.8.0 node-appwrite: 20.3.0
What if you use the older collection API/methods
I just checked and it seems to be the problem, doing the request with the new API method, I got the error but with the older one, It runs without problem
We had a bug where the Console wasn't registering the new scopes so maybe that's the issue.
I just released 1.8.1. maybe you can try that. It requires a migration though
I've upgraded (everything ok with upgrade+migrations)
But I keep with the problem, the bug was to solve the scopes in the function?
If the old API work shouldn't be the console problem right?
Maybe update the scopes in the settings
it seems to be like a problem with dynamic keys, as the few minutes (maybe 1 or 2) after deployment the function runs without problem
I did it, I have added all database scopes
The docker logs keep showing:
appwrite | Line: 34
appwrite | [Error] Timestamp: 2025-12-24T00:05:00+00:00
appwrite | [Error] Method: GET
appwrite | [Error] URL: /v1/tablesdb/:databaseId/tables/:tableId/rows
appwrite | [Error] Type: Utopia\Database\Exception\Authorization
appwrite | [Error] Message: No permissions provided for action 'read'
appwrite | [Error] File: /usr/src/code/vendor/utopia-php/database/src/Database/Database.php
You removed, saved, added, and saved again?
Yes, more than once.
Clear cache, removed all scopes, saved, Added all, saved
But if it's realated to the console bug, it should always fail right?
but if you use the collection API it always works?
Yes, now I have two request in the function, one with the classic and one with the new one. At the beginning, both works and a few minutes later, the classic keep working and the new one gives me the error AppwriteException: The current user is not authorized to perform the requested action.
To resume better the issue:
I have added the classic call and the new API call
databases.listDocumentsdatabases.listRows- I'm using dynamic keys
- A few minutes after deploy, the function works without problem
- After 3 or 4 minutes it starts to show the error
AppwriteException: The current user is not authorized to perform the requested action( in the function)No permissions provided for action 'read'(in the backend)
But databases.listDocuments never throws an error, I always see
{"total":0,"documents":[]}}
I have log the key and it always gets a new one, so the problem must be listRows
Recommended threads
- Session not found. Please run appwrite l...
I have encounter an issue with appwrite CLI They asking for a login session but in the doc, it’s mention that only setup client with endpoint / api key is enou...
- SELF HOSTING ISSUE, DATA NOT MIGRATING T...
Hey, devs, I recently tried to migrate my cloud instance to a self hosted version but my data is not transferred fully only the table structure is transferred ...
- No Document ID?
Hi I have a self hosted appwrite. My documents get a document ID but are not visible in the console. I don't know why this happens and how to fix this