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
- Invalid token passed in the request
Hello, I have an issue using updateMagicURLSession. I send the email using sendMagicLink, which works fine. When i click the link in the email i get the invali...
- how can i make a relationship between a ...
i want to relate the $id from users auth table in appwrite with other column in my table user_profile. because is the same user... how can i have exactly the s...
- Google login on mobile not working
Hi the gg login auth in mobile not working. No error show. But the user couldnt login in Attached is the video. Desktop is working well and im using custom doma...