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
- Appwrite-injected variables are not avai...
I am using rust-1.83 as a runtime and try to access APPWRITE_FUNCTION_API_ENDPOINT or APPWRITE_FUNCTION_API_KEY during runtime. Both are not set during my execu...
- Functions in cloud console not works
please advise as all of my runing functions on Appwrite console was working before , but now it give this error [Invalid `headers` param: Value must be a valid...
- [SOLVED] Production down - createExecuti...
Hey, Since 1.9.6 rollout in fra (~17:00 UTC, 14 Aug), POST /v1/functions/{functionId}/executions returns a 400 whenever the body includes an empty headers ob...