Important: These instructions are specific to Postman V10. If you are using a newer version of Postman, you may notice slight differences in the interface or steps, but the basic procedure should remain similar.
-
Follow the instructions on the walkthrough for Create an App.
When specifying details of the app:
- Select Traditional Web App as the Application Type.
- Ensure that the Model Derivative API and Data Management API are selected under API Access.
-
Note down the Client ID and Client Secret of the app you created. You will need these in the next step.
In the Model_Derivative environment, set two Postman Environment Variables named client_id
and client_secret
. By configuring these variables, you won't need to specify values for the Client ID and Client Secret every time you send HTTP requests to APS.
To set the environment variables:
-
Click the Environment quick look icon on the upper right corner of Postman.
-
Click in the CURRENT VALUE column on the client_id row. The Edit icon displays.
-
Click the Edit icon and enter the Client ID you noted down earlier.
-
Similarly, enter the Client Secret you noted down earlier, in the CURRENT VALUE column on the client_secret row.
-
Click the Environment quick look icon again to close it.
To get an Access Token, you must send an authenticate
request to APS. The Postman Collection has a prepopulated authenticate request that you can send.
To send the authenticate request to APS:
Before you request an access token, you must encode your Client ID and Client Secret to ensure the integrity of the data you send. To do this, first, concatenate your Client ID with your Client Secret using the colon character as a separator. After that, you must convert the concatenated string to a Base64 encoded string. A pre-request script in Postman handles this conversion for you when it sends the next request to APS.
To request an Access Token from APS:
-
In the Postman sidebar, click Task 1 - Obtain an Access Token > POST Get an Access Token. The request loads.
-
Click the Pre-request Script tab. Examine the script that encrypts your Client ID and Client Secret.
-
Click Send. Postman sends the HTTP request to APS. If the request authenticates successfully, you should see a return status of 200 OK. Expect a response similar to the following:
A script defined in the Tests tab saves the Access Token to a Postman environment variable named access_token
. Postman picks up the Access Token from this variable for all subsequent requests. The token remains valid for one hour. If the token expires, you must obtain a fresh token by sending an authenticate
request to APS once again.