Hello Beautiful People,
I'm working on a feature where I need to execute certain actions in a function when a user account is deleted. This function would ideally be triggered by the account deletion event in Appwrite.
My key question is: Does Appwrite pass any specific data (like userID
or other identifiers) to the function when it is triggered by an account deletion event? If so, how can I capture and utilize this data within my function?
I'm specifically looking to understand:
- The nature of the data passed to the function on such an event.
- The method or syntax for accessing this data within the function. Any guidance, code snippets, or pointers to relevant documentation would be immensely helpful.
Thank you for your assistance!
Got the solution. The users id can be accessed through the request object passed by the event through JSON.stringify(req.body)
yes, the body always contains the payload of the event. so, if you have a function that triggers on document update, the body would be the updated document.
In addition, the headers have some additional info too, such as who triggered the function: https://appwrite.io/docs/products/functions/development#headers
Recommended threads
- HTTP POST to function returning "No Appw...
Hi everyone, I’m running into an issue with my self-hosted Appwrite instance. I’ve set up my environment variables (APPWRITE_FUNCTION_PROJECT_ID, APPWRITE_FUNC...
- Can't add dart 3.5 runtime
Modified the `.env` to enable dart 3.5 runtime on my self-hosted instance but still can't find the runtime when creating a new function. I manually pulled the i...
- How to verify an user using AppWrite Fun...
I have seen similar questions but none whose solutions serve me. I have a function to verify a user with their secret and their id: https://blahblah.appwrite.gl...