
we have a function that we are attempting to create a document
const { databases } = await createAdminClient();
const newTournament = await databases.createDocument(
databaseId,
tournamentsCollectionId,
ID.unique(),
tournamentData
);
we are using our admin client const createAdminClient = async () => { const client = new Client() .setEndpoint(process.env.NEXT_PUBLIC_APPWRITE_ENDPOINT!) .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT!) .setKey(process.env.NEXT_APPWRITE_KEY!);
return { get account() { return new Account(client); }, get databases() { return new Databases(client); }, get storage() { return new Storage(client); }, get users() { return new Users(client); }, }; };
this should allow us to overwrite all permissions. but we are getting this error Failed to create tournament: AppwriteException: The current user is not authorized to perform the requested action.

we have logged the database and client and we are not sure how we could be unauthorized to create a document. Any help to get this working would be great
Recommended threads
- Subdomain failed verification
So I wanted to do a custom subdomain, because local storage doesn't work for me, but I've tried it a long time ago, it didn't work for me, and now I'm trying ag...
- Query params are way too limiting in ter...
I was trying to list rows in a table that do not already exist in another table. I retrieved around 260 row IDs which are 13 characters in length each, and then...
- [Node.js SDK] Bypass 2GB file limit?
Hello. Using either InputFile.fromPath or InputFile.fromBuffer throws this error: File size (2295467305) is greater than 2 GiB Bucket limit etc. is setup corre...
