@@ -78,13 +78,28 @@ Before we can make requests to the API, we will need to generate an **access tok
78
78
79
79
![ Authorization (step 1).] ( assets/postman-1.png )
80
80
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"** .
82
85
83
86
![ Authorization (step 2).] ( assets/postman-2.png )
84
87
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:
86
101
87
- ![ Token button .] ( assets/access-token .png )
102
+ ![ Authentication complete .] ( assets/auth-complete .png )
88
103
89
104
You now have an access token that has an expiry of ` 300 ` seconds, and we can make requests to the API.
90
105
0 commit comments