Should Scripts work on Folder level when Authorization is run?

Folder has Scripts tab with Pre- and Post- events to write code.

However, it doesn’t look like the code is processed at all.

Is it supposed to work?

It feels like a lot of context and information is missing here - It will run in the following order:

It depends what the script is though and that could be a number of different things.

I just added console.log(“Test Post-script”); and there is no output in the Console.

Just to clarify, I use “Get New Access Token” and “Refresh Token” on the Authorize tab of the Folder.

Those wouldn’t be sending the main request though so it wouldn’t write the line in the console.

When you send a request within the folder, does it also write that console log message.

I didn’t get your question.

The mentioned actions create log in the Console when the Token is requested or Refreshed. But Scripts are not run.

That’s a separate individual action done by clicking those buttons, the network logs are shown to display that Auth request being made.

The pre-request scripts fire when you hit the ’Send’ button and the post-response script fires when the response is received from those requests.

Is there a way to access the tokens from a code? I want to save them in Environment.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.