Hi all, requesting for parameters that can be captured from appwrite server when working with APPWRITE_FUNCTION_EVENT_DATA on client side. Possibly can also assist with document that show structure and content of APPWRITE_FUNCTION_EVENT_DATA.
APPWRITE_FUNCTION_EVENT_DATA
or req.payload
contains the data being sent to the function.
The value is string.
So when you send it you should stringify it, and parse it
Client
await functions.createExeuctions('',JSON.stringify({}));
Function
try {
const data = JSON.parse(req.payload);
// This is just like the above row
const data = JSON.parse(req.variables['APPWRITE_FUNCTION_EVENT_DATA']);
} catch (e) {
// Data is not json parsable.
}
thank you
thank you
[SOLVED] How to use APPWRITE_FUNCTION_EVENT_DATA?
Recommended threads
- Send Email Verification With REST
I am using REST to create a user on the server side after receiving form data from the client. After the account is successfully created i wanted to send the v...
- Use different email hosts for different ...
Hello, I have 2 projects and i want to be able to set up email templates in the projects. Both projects will have different email host configurations. I see ...
- Get team fail in appwrite function
I try to get team of a user inside appwrite function, but i get this error: `AppwriteException: User (role: guests) missing scope (teams.read)` If i try on cl...