postmanlabs / postman-app-support

Postman is an API platform for building and using APIs. Postman simplifies each step of the API lifecycle and streamlines collaboration so you can create better APIs—faster.
https://www.postman.com
5.82k stars 836 forks source link

msg #8625

Closed marcojsa closed 2 years ago

marcojsa commented 4 years ago

Hi all,

I'm trying to send an API request to Zoho CRM using Postman. Zoho uses the OAuth2.0 Authentication method, and it's very easy to get the access token through Postman using the Zoho CRM Collection, but when I try to make a request a msgbox appears with the following message:

"There was an error in evaluating the Pre-request Script: undefined: access-token is empty or expired"

I found in many forums another persons with the same issue, but none of the proposed solutions worked for me, so I decided to contact Zoho support. I shared my screen with a Zoho developer and he tried for hours to fix that. We tried to insert lots of scripts into Pre-Request Scripts tab, defining the access-token variable, we tried to set access-token as a global variable but nothing worked (and the access token was not expired).

So Zoho's developer told me it's an issue in Postman and suggested me contact Postman to fix this bug, but watching a tutorial video made by Zoho (https://www.youtube.com/watch?v=ETlhFkx47rg&t) they follow exactly the same steps I did without any issue... anyone could kindly help me with that? I'm attaching Postman's screenshots with my setup and the scripts we used into Pre-Request Scripts. PM1

Img3

Some addicional informations: OS: Windows 10 64bits Postman version: 7.26.0

erigglem commented 3 years ago

If you open a new tab in Postman, this will work without the error. Took me hours to finally figure this out.

DannyDainton commented 2 years ago

Hey @marcojsa

I'm going to close this issue - If you're still experiencing this in the new version of the platform, we can look at reopening it again.