I’ve multiple custom server scripts (type API). I have some common functionality like authenticating a request, which I have extracted out as a server script which is getting called in multiple methods using run_script method provided by frappe (since version 13). And I’m able to access the response of authenticate request server script using this
is_authenticated = run_script('Authenticate Request').get('is_authenticated')
and in my called script I’m doing setting is_authenticated in flags.
frappe.flags.is_authenticated = False/True
Now I want to create another server script to build a uniform response structure. But for that, I need to pass various parameters from the calling
server script to the called
server script. I’m not able to find a way to do this.
Can someone please help me.