2
votes

I would like to set the return value of an auth call (a token) as an environment variable so that other calls can make use of the value and I don't have to change that value manually.

Can Paw already do this easily?

If not, how would I lay out an extension to achieve this?

1

1 Answers

2
votes

The best is that you set your OAuth dynamic value in your header field, then copy the value (select the text and hit Cmd + C):

enter image description here

Go to edit your environments and paste the dynamic value (Cmd + V) in a new variable:

enter image description here

Now go back to your header, and start to write the name of the environment variable you just created, it will offer you to use this variable:

enter image description here

You should be good to go now:

enter image description here

If later you need a change in your token, you can go back to the environments and edit it there, all at the same place.