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
- Functions Failing on CRON Schedule
I set up an hourly CRON Schedule for my function and It only executes successfully every after 3 hours sometimes 10 hours. When I execute it manually it works e...
- MongoDb Database Breaks integer[] & bigi...
I've got a table with the below column created. When I try to insert the value `[-3408048000]` into it, the dart sdk cloud function call is successful (no error...
- Appwrite Functions cold start
Hello. I'm seeing really long cold starts on Appwrite Cloud Functions and wanted to know if this is expected. My function just authenticates the user, fetches ...