We need to load the widget session from req.session.access_token (Lexi). We also need to remove any req.session.access_token = req.Widgetsession.lexi_access_token that we did to avoid breaking the code.
Keep in mind that postman is sending cookies so session got When working with Postman and our APIs, it’s important to know that Postman sends it’s own cookies which can lead to sessions getting lost.
A workaround to avoid this is disabling to disable cookies, or set this configconfiguration in Postman:
...
Go to Manage Cookies
...
2. Click Whilelist Domains
...
3. Add domain. This can be Localhost or , staging, etc (depending the environment you want to test).
4. And in the POST oauth/token request, please add the following code:
...
replace last line with the following:code…
Code Block |
---|
pm.cookies.jar().unset(pm.environment.get("pos_url"),'connect.sid'); |
… as pictured below.
...
Info |
---|
This is done to get the postman working on different |
...
environments. You will need to whitelist all the different |
...
environments, you will be using in Postman (for example, |
...
“posapi- |
...
mi.flexiti. |
...
fi” - without http:// or https://) |