Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
Is your feature request related to a problem? Please describe.
I am trying to use a variable in the name of an Access Token when generating OAuth2 tokens via the 'Generate New Access Token' UI. The variable I want to use doesn't exist ($now) at that point in time, but I was hoping that the pre-request scripts would also apply to token requests. Sadly, they appear not to.
Describe the solution you'd like
Add an option to execute pre-request scripts when generating tokens.
Describe alternatives you've considered
I've considered generating the token in a collection/request pre-request script, however this isn't as easy to keep multiple tokens around and doesn't really support the full OAuth2 3-step auth code flow.
Additional context
I think it would be great if there was a simple expandable section here that allowed me to enter a pre-request script that would run just before the auth request gets made after clicking 'Request Token':
Is your feature request related to a problem? Please describe. I am trying to use a variable in the name of an Access Token when generating OAuth2 tokens via the 'Generate New Access Token' UI. The variable I want to use doesn't exist (
$now
) at that point in time, but I was hoping that the pre-request scripts would also apply to token requests. Sadly, they appear not to.Describe the solution you'd like Add an option to execute pre-request scripts when generating tokens.
Describe alternatives you've considered I've considered generating the token in a collection/request pre-request script, however this isn't as easy to keep multiple tokens around and doesn't really support the full OAuth2 3-step auth code flow.
Additional context I think it would be great if there was a simple expandable section here that allowed me to enter a pre-request script that would run just before the auth request gets made after clicking 'Request Token':