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
- RowList: The value of total is coming as...
RowList: The value of total is coming as a String, so it throws an error because it’s not parsed into an int. Error: TypeError: \"37\": type 'String' is not a ...
- User Blocked - False Positive
Today I tried to log in to my cloud console and it said the user is blocked and I didn't even receive any email regarding this like what kind of violation is my...
- is `account.get()` safe to be used in th...
I want to user's `id` for authentication. However, a while ago I was told in this server not to use `account.get()` and instead add user preferences for that us...