Postman Collection - Error:- There was an error in evaluating the Pre-request Script: undefined: undefined

Issue:- I have imported Public Postman collection of Orchestrator API and have created an Environment respective variables. But when I try to authenticate or run an API it throws an error.

Error:- There was an error in evaluating the Pre-request Script: undefined: undefined.

Please refer to the image below:-

Anything that I am missing?

Thank you,
Prashant :smiley:

1 Like

Postman Console logs:-

Hello @Prashant_08

  1. For authentication-Headers enter logical tenant name

Authentication body-
“grant_type”: “refresh_token”,
“client_id”: “{{clientId}}”,
“refresh_token”: “{{userKey}}”
you can fetch the client id, and user key from orchestrator API

you will get response as-
“access_token”: “token”,
“id_token”: “key”,
“scope”: “openid profile email offline_access”,
“expires_in”: 86400,
“token_type”: “Bearer”

1 Like

Hi @Lipika_Porey,

Thank you for the suggestion.

Yes, indeed when we pass the corresponding details like a normal Request it works.

The issue is with this Collection Link:- UiPath Connector Guide

It does not work in a straight forward way. So while making the request it throws an error.

Hi Everyone,
I face the same issue after importing the uipath library in postman, everytime I tried to execute any api call I got the this error: “TypeError: Cannot read property ‘includes’ of undefined”.

I was able to fix this by going to the Orchestrator Collection, then ‘right click’ and click on [Edit collection], you will find a ‘Pre-request Script’ tab. You need to delete that script, apparently, there is an error somewhere in that script, or you may need to configure that before trying to run API calls.

In any case, I just needed to run simple API calls so decided to delete the script, and everything starts! to work.