TomDoesTech/REST-API-Tutorial-Updated

Postman collection using latest Postman on MacOS does not update accessToken

Closed this issue · 2 comments

Screen Shot 2021-10-15 at 14 18 47

Just a heads-up really, but after a default install of Postman on MacOS cataline 10.15.7, the variables never get updated automatically after creating a session, so I have to copy manually into the variables field.

When I'd log out the application, it would receive <accessToken will be set when you create a session> in the request

Thanks for your tutorials, they have been a great way to get back into development after a long break. I'm trying to build a real project with this stack.

I had this issue, but you just have to create an environment using the environments tab on the left, then it should be updated.

or you can write this two instead:
in test tab of create Session instead of those two.
because you need to set them as collectionVariable.

pm.collectionVariables.set("accessToken", jsonData.accessToken);
pm.collectionVariables.set("refreshToken", jsonData.refreshToken);