Skip to content

Commit d915623

Browse files
authored
Merge pull request #2143 from arduino/karlsoderby/postman-example-update
[MKC-1613] Update Postman Section
2 parents f7f5c30 + ccc8e03 commit d915623

File tree

6 files changed

+18
-3
lines changed

6 files changed

+18
-3
lines changed

content/arduino-cloud/07.api/02.arduino-iot-api/arduino-iot-api.md

+18-3
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,28 @@ Before we can make requests to the API, we will need to generate an **access tok
7878

7979
![Authorization (step 1).](assets/postman-1.png)
8080

81-
Now, click on the **"Advanced Options"** tab, and add `https://api2.arduino.cc/iot` to the **"Audience"** field.
81+
- Set **"Auth Type"** to **"OAuth 2.0"** with a **"Request Header"**
82+
- Select **"Token Name"**, and **"Bearer"**
83+
84+
Then scroll down to the **"Configure New Token"**.
8285

8386
![Authorization (step 2).](assets/postman-2.png)
8487

85-
Finally, click on the **"Get New Access Token"**.
88+
- Set **"Grant Type"** to **"Client Credentials"** and set `https://api2.arduino.cc/iot/v1/clients/token` for the **"Access Token URL"**.
89+
- Add your Client ID & Client Secret (obtained in Arduino Cloud API Keys / Devices).
90+
- Set the **"Client Authentication"** to **"Send client credentials in body"**.
91+
92+
Then, click on the **"Advanced"** tab, and populate the fields according to the image below:
93+
94+
![Authorization (step 3).](assets/postman-3.png)
95+
96+
- **Key** is set to `audience`
97+
- **Value** is set to `https://api2.arduino.cc/iot`
98+
- **Send In** is set to **Request Body**
99+
100+
Finally, click on the **"Get New Access Token"**. You should get a pop-up window. On success, it should look like this:
86101

87-
![Token button.](assets/access-token.png)
102+
![Authentication complete.](assets/auth-complete.png)
88103

89104
You now have an access token that has an expiry of `300` seconds, and we can make requests to the API.
90105

Binary file not shown.
Loading
Loading
Loading
Loading

0 commit comments

Comments
 (0)