Generating Credentials With Postman
  • 07 Nov 2023
  • 1 Minute to read
  • Dark
    Light

Generating Credentials With Postman

  • Dark
    Light

Article Summary

How To Generate Credentials (Postman)

Getting Started

Download Postman

  • Download and install Postman from https://www.postman.com.
  • Create and setup your user account and password
  • Create your workspace


Download CobbleStone® Postman Collection

You will need to download the zip file CobbleStone® REST API Postman Samples for access to endpoints.

Get REST API URLs

To find your API URL:

SaaS Clients can view the How To: Locate API Information (SaaS Clients) article 

Deployed Clients can view the How To: Locate API Information (Deployed Clients) article

Setting up in Postman

UnZip the downloaded CobbleStone® REST API Postman Samples to be able to access the json file

In Postman, choose File > Import and choose Upload Files


Select the unzipped CobbleStone® REST API Postman Samples.postman_collection from your File Explorer window


You will now see the endpoints listed like so:


Select Authorization from the list and choose the Body tab at the top right


Getting Authorized

Edit the POST URL to match your respective BASE URL followed by /oauth/token


Next click in the Body window and edit the line of code for the Client ID.


Replace the highlighted text with your API Client ID found under My > My API Clients



Next replace the highlighted text with your API Client Secret found under My > My API Clients

 

Click Send to Authorize


You should see results in the bottom window after a few seconds


You will need to copy the access_token value (excluding the quotes) and update other endpoints.


You may step through each collection item and in the Headers tab, in Authorization value, insert copied token value (excluding the quotes) following “Bearer” word. Make sure there is a single space after “Bearer”.


Global Variables in Postman

For convenience, you may use Postman variables (placeholders) for REST API address, authorization token, and other values.

1. Click on Environment quick lookup icon in Postman

2. Under Globals section, click add/edit button, depending on whether you have any variables yet.

3. In the Variable column, type your variable name. Select Type (default). Add the Current Value for your variable (REST API server address or authorization token for instance). Then, hit save.


4. To make use of the variables, use {{yourVarNameNoQuotes}} syntax in the postman requests


You may add more variables such as ones for refresh_token, client_id, and client_secret. In addition to global variables, Postman allows to add variables at the collection level. You will need to click on the three dots on the right side of the collection and select “Edit”. In the window that shows up, click “Variables” Tab to add variables at the collection level:




Was this article helpful?