TomDoesTech / REST-API-Tutorial-Updated

https://www.youtube.com/watch?v=BWUi6BS9T5Y
574 stars 283 forks source link

Postman collection using latest Postman on MacOS does not update accessToken #3

Closed replete closed 3 years ago

replete commented 3 years ago

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.

jakecoombs commented 3 years ago

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

EBay1992 commented 2 years ago

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);