Hello,
Thanks for all the inputs.
I solved it by setting the variable to update on time change instead of the Dashboard Load.
And setting the Variable as hidden. This way the key generated will not be visible to the users.
So whenever we load the dashboard it will need a time input to load the charts and tables, so the time change is also triggered, which is triggering my variable and generating the token key.
This output from the variable is then used for the authorization of the GET or POST api I am invoking to fetch the data I need.
Hope this implementation method helps someone.
Thanks & Regards,
Bhushan