
Hi All, I seem to be having issues with nodejs and the sdk.
I've setup an API key which has all scopes for the project, but I keep getting the "The current user is not authorized to perform the requested action." error.
If I change the collection permission settings so that 'all guests' can do all actions it works fine, but I thought the API keys didn't use the permission settings of the collection, so I'm a little confused. Any suggestions?
const dotenv = require("dotenv");
dotenv.config({ path: "./config.env" });
//const mapping from process.env here
const client = new sdk.Client()
.setEndpoint("https://my.fqdn.here/v1")
.setProject(APPWRITE_PROJECT)
.setSession(APPWRITE_API_KEY);
const databases = new sdk.Databases(client);
async function getDocuments() {
try {
const result = await databases.listDocuments(
APPWRITE_DB, // databaseId
APPWRITE_COLLECTION // collectionId
);
console.log(result);
} catch (error) {
console.log(error);
}
}
getDocuments();
Recommended threads
- 1.6.2 to 1.7.2 upgrade, no console acces...
I just updated from 1.6.2.to 1.7.2, didn't notice any errors in the update or migration process but seem to be stuck not being able to access the console UI any...
- Self Hosting Error Cannot Create Default...
Just installed appwrite and upon doing an initial sign up for the default user it errors out with ```NetworkError when attempting to fetch resource.```
- Changing Default Port (appwrite:1.7.2)
Hello! I am trying to run appwrite locally to test things out and i wanted to change the default ports. I have seen this post https://discord.com/channels/56416...
