I have a function that inserts a document to a collection, but I also need to get the user id of the one who invoked the function. I use client side SDK for executing the function.
I tried the following:
`const { Client, Databases, Account } = require('node-appwrite');
const appwriteClient = new Client(); const databases = new Databases(appwriteClient); const account = new Account(appwriteClient);`
but the account variable produces an error.
(role: applications) missing scope (account)
nvm, i just found out about the req.headers x-appwrite-user-id
[SOLVED] How to get user id from the executed function?
Recommended threads
- Not getting data
IDK what the issue is but I am stuck at a weried but that I am calling this function ``` @override Future<List<CategoryModel>> getCategories() async { t...
- Problem with the new Email policies
when user set those thing from cloud panel and when they open that page again or reload that time it forget what we have checked and it set default to false on ...
- Deleted my account, trying to signup aga...
https://cloud.appwrite.io/console/login?error=%7B%22message%22%3A%22This+email+address+must+already+be+in+its+canonical+form.+Please+remove+aliases%2C+tags%2C+o...