I create Functions using dart and Inside my functions setting tab, I add custom variables ->updateVariable->Create Variable key : my_key, value: "test123" the question how can I access my custom variable inside my dart function code ? I tried this final myKey = my_key; can you show how can I do it, thanks
Hi 👋
Should be possible the same way it is done for the other variables as well:
final myKey = req.variables['my_key'];
From the docs: https://appwrite.io/docs/functions#writingYourOwnFunction
final secretKey =
req.variables['SECRET_KEY'] ??
'SECRET_KEY variable not found. You can set it in Function settings.';
ho thanks Jyoti 😀
No problem <:appwritecheers:892495536823861258>
@showmore Do not forget to mark your post with "[SOLVED]" if it was solved
Recommended threads
- ClientException with SocketException: Cl...
hi <@564158268319203348> i have noticed this 500 status code in my function requests, it seems its not able to connect to the internet in the function as reque...
- NEW ERROR Invalid document structure: At...
Error: ```AppwriteException: document_invalid_structure, Invalid document structure: Attribute "pb.kmsgxPkgInfo.id_info" must be an array (400)``` I’m encounter...
- Issues with executor in Appwrite 1.9.0
Hi, I’ve recently did a fresh install of appwrite 1.9.0 self hosted and when I run a function, it just waits indefinite This is the error from the log: [Er...