hi, if i have a function, and i need to pass the users id who executed it, how can i do that?
To pass the user ID of the person who executed the function, you need the APPWRITE_FUNCTION_USER_ID
variable
const userId = res.variables['APPWRITE_FUNCTION_USER_ID']
This variable will automatically contain the user's ID
who executed the function.
thank you! is there a documentation for other variables like this aswell?
Recommended threads
- Functions URL Defaulting to HTTP Instead...
Hi everyone, I’m currently facing an issue with function URLs in my Appwrite setup, and I would appreciate some guidance. **Setup Details:** Appwrite Version: ...
- accidentally deleted attribute how to re...
Create attribute Creation failed SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'treatmentConsent'
- No user data after Google OAuth
I'm attempting to integrate Google sign in to an ios app - it seems to work, and redirects back to app. It does create a new user, (or a new user session after...