Back

Appwrite functions authorization

  • 0
  • Databases
  • Web
  • Cloud
stuartdambi
29 Jul, 2024, 15:04

I am creating an Appwrite Function and it is supposed to create some documents in the database. I am facing permissions issues when creating the document. "{"message":"An error occured","error":"User (role: guests) missing scope (users.read)"}" Something I understand that I need to authorize the request. However I am unable to figure out how to do this and need some help.

Here is my implementation functions .createExecution("<functionId>", JSON.stringify(payload)) .then((response) => { console.log('func success: \n', response); }) .catch((error) => { console.log('func failed: \n', error); });

TL;DR
Developers are facing permissions issues with Appwrite functions creating documents in the database due to authorization error. The error indicates a missing scope ('users.read'). To solve this, developers need to make sure they are signed in and have the necessary permissions to perform the requested action.
Evdog
29 Jul, 2024, 15:46

Is that the full code? That error usually indicates that you're not signed in

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