Created
April 11, 2022 08:20
-
-
Save eguicciardi/714a6356976f241dfa96fd0a95caaac5 to your computer and use it in GitHub Desktop.
Set JWT Token with Postman
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
// If access.token is returned, save it on the collection variable "jwtToken" | |
var jwtToken = pm.response.json()?.access?.token || false; | |
if(jwtToken) { | |
pm.collectionVariables.set("jwtToken", jwtToken); | |
} | |
} catch(error) {} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment