Skip to content
Back

No permissions provided for action 'read'

  • 0
  • Self Hosted
  • Functions
Guille
23 Dec, 2025, 03:21

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

TypeScript
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:

TypeScript
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

TypeScript
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

TL;DR
Developers experiencing authorization errors with new API calls `databases.listRows`, while old API calls like `databases.listDocuments` work fine. Despite trying various solutions and upgrades, the issue persists. An update to Appwrite 1.8.1 may help as there was a bug in the console not registering new scopes correctly. The error appears related to dynamic keys and scopes misconfiguration. Troubleshooting continues.
Steven
23 Dec, 2025, 04:34

What if you use the older collection API/methods

Guille
23 Dec, 2025, 18:16

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

Steven
23 Dec, 2025, 18:33

We had a bug where the Console wasn't registering the new scopes so maybe that's the issue.

Steven
23 Dec, 2025, 18:33

I just released 1.8.1. maybe you can try that. It requires a migration though

Guille
24 Dec, 2025, 00:06

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?

Steven
24 Dec, 2025, 00:06

Maybe update the scopes in the settings

Guille
24 Dec, 2025, 00:07

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

Guille
24 Dec, 2025, 00:07

I did it, I have added all database scopes

Guille
24 Dec, 2025, 00:11

The docker logs keep showing:

TypeScript
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
Steven
24 Dec, 2025, 01:18

You removed, saved, added, and saved again?

Guille
24 Dec, 2025, 01:57

Yes, more than once.

Clear cache, removed all scopes, saved, Added all, saved

Guille
24 Dec, 2025, 02:00

But if it's realated to the console bug, it should always fail right?

Steven
24 Dec, 2025, 06:02

but if you use the collection API it always works?

Guille
24 Dec, 2025, 10:24

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.

Guille
24 Dec, 2025, 12:13

To resume better the issue:

I have added the classic call and the new API call

  • databases.listDocuments
  • databases.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

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