cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Postman With Personal Access Tokens

Using Postman With Personal Access Tokens

I have created (yet another) Postman collection for the IDN API. Now that PATs are available for authentication, the process is much more straightforward then it was before. No more "full authentication required" or wrangling of URLs and cookies. The one time setup consists solely of creating a PAT in the IDN UI and adding it to Postman. That's it. 

With the first API call, the PAT is used to generate an access token which is then used for subsequent API calls. The access token will eventually expire but Postman monitors that condition and will generate a new token as needed. 

Feel free to give it a try and let me know of any comments.

https://bitbucket.org/Greggulator/identity_now_postman_collection

Labels (3)
Comments

Hello @Hayreddin!

I've downloaded the necessary environment and postman collection, as well as set the variables listed (org_name, pat_id, pat_secret). However, when I run the Get Organizational Settings call, it errors with "There was an error in evaluating the Pre-request Script:Error:No org_name found. Is your environment configuration valid?" 

I've gone back and ensured I have the correct information posted, no URLs just the org name for our tenant. Am I missing something here? 

Hi,

Is the org present in the Current Value column of the environment config and is the relevant environment selected in the dropdown of the main window?  That's what I typically miss.

Ahhh!!! The dropdown! No environment was selected. As soon as I changed that to our sandbox environment the Get command worked like a charm. Thanks!

Ok @Hayreddin got one more question for ya! lol
I was able to help a co-worker get his postman set up using your collection and steps and it worked perfectly. However one of our other co-workers followed the same exact steps and received the error below. I cannot find anything wrong within the pre-requisite script as it's the same one I used and the other guy used. Any ideas?

Jeff_error_2_11172022.JPG

That's a fairly common error in JS.  I believe that happens when a JSON file is not actually JSON or the character encoding is wrong.  If the collection was downloaded as is and didn't get corrupted, I can't imagine what the problem may be.

Nice, I converted your pre-request script to work with the public Postman collections as I was getting the "full authentication required". Slick. Thank you!

Hello all,

I have update the collection to allow for the handling of demo orgs.  Please see the docs and the example environment file for more info.

Version history
Revision #:
4 of 4
Last update:
‎Jan 06, 2021 04:14 PM
Updated by:
 
Contributors