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
- Function domain not available
Hello, even tho in docs you clearly describe that every function has its domain, I can not see it anywhere in any of my projects. How do I reveal the url of th...
- Inquiry: How to Reduce Cold Start Durati...
Hey! I was using Python for the function runtime, but after reading that Go has the fastest runtime, I switched my code over to Go. However, I'm still seeing co...
- After a GET request is passed to functio...
Create execution in the console can normally retrieve the get parameters。WHy?