Display the Thumbnail
Key learnings
After fetching the thumbnail URL, you may like to view the thumbnail. But you cannot view the thumbnail image through any browser. Viewing a thumbnail requires applications like Postman (by using a 3-legged token) to send the request URL and receive the thumbnail image in response.
By the end of this task, you will be able to:
- Configure a 3-Legged Token for the request.
- View a thumbnail using the
GET
request in Postman.
Step 1 - Download and Import Tutorial Postman Collection
For this tutorial, we have saved the view thumbnail query in the postman collection in a GitHub repository for you to use.
The following steps will guide you through the process of configuring the collections in Postman:
- Download the ZIP file containing the Postman Collection from this GitHub repository.
- Extract the ZIP file to an accessible drive location to import collection.
- In Postman, use the Import button on the top-left to import the Postman collection. See Importing and exporting data in Postman for more information.
Step 2 - Configure the request for 3-legged Authentication
- In the Postman sidebar, find the ‘Manufacturing Data Model Tutorial’ collection and select the View Thumbnail request. You should see screen similar to the following:
- In the center area, click the Authorization tab (if it is not selected).
- In the Configure New Token section:
- In the Type dropdown, verify that the selected Authorization type is OAuth 2.0 (Refer 1 in the provided image).
- In the Add authorization data to dropdown, verify that the field value is set to Request Headers (Refer 2 in the provided image).
- In the Client ID box, enter the Client ID of the app, you obtained this ID when you were following the instructions in Before you begin, (Refer 3 in the provided image).
- In the Client Secret box, enter the Client Secret of the app, you obtained this ID when you were following the instructions in Before you begin, (Refer 4 in the provided image).
- In the Authorization tab, scroll down to the bottom and click Get New Access Token, (Refer 5 in the provided image).
The following image will help you to correlate to the task mentioned earlier.
![]()
Step 3 - Obtain an Access Token
In this step, you obtain an access token to authenticate your view thumbnail request.
- In the Autodesk Sign in screen that pops up, sign in, giving your app permission to act on your behalf.
- In the Manage Access Tokens screen that is displayed after you successfully authorize, click Use Token.
Note: If you are unable to observe any of the expected results, check if you have specified the Client ID and Client secret correctly.
Step 4 - Display the Thumbnail
- In the Postman address bar, enter the Thumbnail URL from the previous Get Thumbnail URL.
- Verify that the request method is set to
GET
. - Click Send.
After working through the steps above, you should be able to see a thumbnail in the body of the response.