jeremys/Simple-Rest-Client-Chrome-Extension

Collection monitor not updating the environment variables which are set in tests

germainalb opened this issue · 1 comments

Hi everyone,
I have an issue on postman. I want to monitor a collection. The collection starts by refresh a access token. Then I use this token to access some data. Then I have to save this refresh_token in my environment variable to reuse it later. I have read on the net that I should use a postman API. I use this endpoint to refresh my data:
PUT https://api.getpostman.com/environments/{{environment_uid}}
Headers:
Content-Type application/x-www-form-urlencoded
x-api-key {{postman_api_key}}
Body:
{
"environment": {
"name": "MonitorProd",
"values": [
{"key": "refresh_token", "value": ?????? },
{"key": "token", "value": ?????},
{"key": "postman_api_key", "value": "yyyyyyyyyyyyyyyyyyyyyyyyy"},
{"key": "environment_uid", "value": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
]
}
}

What should I put for the refresh_token value and the token_value ?? Because I should have it in my environment but I can't use them in the body, am I right ?
Thank you for your future answer !

sorry wrong section