Fixed PM token refreshing.
This commit is contained in:
@@ -6,4 +6,13 @@ body:
|
||||
content:
|
||||
grant_type: refresh_token
|
||||
refresh_token: "{{refresh_token}}"
|
||||
scripts:
|
||||
- type: afterResponse
|
||||
code: |-
|
||||
var access_token = pm.response.json()["access_token"];
|
||||
pm.collectionVariables.set("access_token", access_token);
|
||||
|
||||
var refresh_token = pm.response.json()["refresh_token"];
|
||||
pm.collectionVariables.set("refresh_token", refresh_token);
|
||||
language: text/javascript
|
||||
order: 2000
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ scripts:
|
||||
pm.collectionVariables.set("access_token", access_token);
|
||||
|
||||
var refresh_token = pm.response.json()["refresh_token"];
|
||||
pm.collectionVariables.set("refresh_token", access_token);
|
||||
pm.collectionVariables.set("refresh_token", refresh_token);
|
||||
language: text/javascript
|
||||
order: 1000
|
||||
|
||||
Reference in New Issue
Block a user