#[SOLVED] I want to build a custom REST API that uses Appwrite as the data store.

7 messages · Page 1 of 1 (latest)

desert summit
#

It's a weird requirement for some client work I'm doing lol.

Okay so I have a self-hosted Appwrite instance running v1.3.1. I've populated the database and buckets as needed. This Appwrite project is being used in a Flutter app, and it works perfectly fine.

Now I have been tasked with creating a custom API, that will interface with the Appwrite project. I tried doing this in nodejs, but calling the listDocuments endpoint on node-appwrite gives me the following error:

AppwriteException [Error]: app.6415d158518bfba247be@service.commander.spirit.remedyway.om (role: applications) missing scope (home)
    at Client.call (D:\development\remedy\spirit-content-api\node_modules\node-appwrite\lib\client.js:172:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Databases.listDocuments (D:\development\remedy\spirit-content-api\node_modules\node-appwrite\lib\services\databases.js:1613:16) {
  code: 401,
  type: 'general_unauthorized_scope',
  response: {
    message: '[email protected] (role: applications) missing scope (home)',
    code: 401,
    type: 'general_unauthorized_scope',
    version: '1.3.1'
  }
}

I'm using an API key with the documents.read scope, and I've tried adding a Web App platform with localhost as the hostname. Any tips?

#

The API is still in development locally, which is why I added the localhost hostname. I feel like that's an issue, but not sure how to go about it.

blissful scarab
desert summit
#

i just did and it worked

#

why is it that everytime i post an issue, it's the dumbest thing 😭

#

Thanks anyways Steven lmao