Back

[SOLVED] (role: applications) missing scope (documents.read)

  • 0
  • Databases
  • Functions
safwan
10 May, 2023, 12:08

you need to create an API key, and give it the documents.read permission. Have you done this already?

TL;DR
There was an issue with a missing scope (documents.read) in the python package used (appwrite 2.0.0). The solution was suggested to add type hints to the python SDK. There was also a suggestion to catch these types of errors at compile time. An API key with the `documents.read` permission needed to be created.
Prateek Jain
10 May, 2023, 13:57

can u please say how to add this permission?

Prateek Jain
10 May, 2023, 13:58

documents = database.list_documents(req.variables.get('DATABASE_ID'), req.variables.get('COLLECTION_ID') , Query.equal('mobileNo', payload['mobileNo']))

safwan
10 May, 2023, 14:00
safwan
10 May, 2023, 14:00

if you're still not able to understand, let me know

Prateek Jain
10 May, 2023, 14:06

thanks for the info...completely forgot this concept. Will test now and let u know sir

Prateek Jain
10 May, 2023, 14:07

Getting this error now:- "Invalid queries: Value must a valid array and Value must be a valid string and no longer than 4096 chars"

Prateek Jain
10 May, 2023, 14:08

should i give indexes.read permission also ???

Prateek Jain
10 May, 2023, 14:08

for using that query?

safwan
10 May, 2023, 14:10

which sdk are you using?

Prateek Jain
10 May, 2023, 14:12

u mean client side?

Prateek Jain
10 May, 2023, 14:14

client side - using latest appwrite package 9.0.0

Prateek Jain
10 May, 2023, 14:14

server side - appwrite cloud based on 1.1.2

Prateek Jain
10 May, 2023, 14:15

python run time - 3.9

Prateek Jain
10 May, 2023, 14:16

python package used appwrite 2.0.0

Prateek Jain
10 May, 2023, 14:23
Prateek Jain
10 May, 2023, 14:24

created this index with index_type as fulltext

safwan
10 May, 2023, 16:31

for which programming language?

Drake
10 May, 2023, 17:54

that 3rd argument is supposed to be an array.

Prateek Jain
11 May, 2023, 10:13

dart

Prateek Jain
11 May, 2023, 10:20

u are awsmm sir....

Prateek Jain
11 May, 2023, 10:21

I would also suggest that these types of errors should be caught at compile time itself

Prateek Jain
11 May, 2023, 10:41

thanks again.... both of u for giving ur valuable time to solve my doubt

Drake
11 May, 2023, 14:48

There's an issue for adding type hints to the python sdk which should help: https://github.com/appwrite/sdk-for-python/issues/43

Drake
11 May, 2023, 14:49

[SOLVED] (role: applications) missing scope (documents.read)

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