-
Follow the instructions on Get Started with Forge in Three Steps to create a Forge App. In the Add Services to Forge stage, select "Design Automation API" and "Data Management API".
-
Jot down the Client ID and Client Secret of the Forge App you created.
In the DA4Inventor environment that you selected earlier, there are two Postman Environment Variables named client_id
and client_secret
. By setting these variables, you don't need to specify their values when you send HTTP requests to Forge.
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 jotted down earlier.
-
Similarly, enter the Client Secret you jotted down earlier in the CURRENT VALUE column on the client_secret row.
-
Click the Environment quick look icon again.
To get an Access Token, you must send an authenticate
request to Forge. The Postman collection has a prepopulated authenticate request that you can send. To send the request to Forge:
-
On the Postman sidebar, click Task 1 - Obtain an Access Token > POST Get an Access Token. The request loads.
-
Click the Body tab.
-
Move the cursor over the Value column of the client_id and client_secret, and verify that the values you specified as environment variables are displayed.
-
Click Send. The request is sent to Forge. If your request authenticates successfully, you should see a response similar to the following:
Postman saves the Access Token in the Postman Environment Variable dasApiToken
. Postman picks up the Access Token from this variable for all subsequent requests. This variable eliminates the need for you to repeatedly specify the value of the token for subsequent requests.