Bye bye Postman – Welcome Insomnia
The sign-in feature at the top of the Postman window always annoyed me. Today, I received an email suggesting that we might want to consider Postman alternatives, which led me to install Insomnia by Kong.
Exporting and importing a Postman file worked seamlessly, and sending a request was of course not an issue. One thing I noticed was the absence of the Tests tab. This feature could be useful if I wanted to store a response as a variable and use it in another request, especially if I wanted to store the token of the result of an OAuth request. However, to be fair, I have only used this feature one or two times in the past and was too lazy to figure out how to store the value. As long as a bearer token doesn’t expire every hour, I’m fine with copying and pasting the token once in a while.
I searched (asked ChatGPT) for a solution within Insomnia and found Chaining Requests.
This is very nice. Pressing Ctrl + Space in the token field shows you the possibility to get the value of a Response – Body Attribute.
…and then select the OAuth request and use the access token as JSONPath: $.access_token. I’ve also defined the trigger behavior to get a new token after 24 hours.
I will use Insomnia more often and definitely take advantage of the possibility to use the OAuth token in this easy and more or less intuitive way. I just need to remember Ctrl + Space (a right click also works) and the JSONPath $.access_token, and then I’m good to go and say bye bye Postman – it was a nice time.