Securing access – unveiling API keys and authentication
Before getting into the meat of the chapter, we first need to talk about the authentication mechanism of the platform. The Arduino IoT Cloud uses a token authentication mechanism to validate Arduino Cloud CLI requests.
Before we start to install and test the Arduino Cloud CLI, we need to set up the API keys in Arduino Cloud that will provide us with the client ID and secret. In older versions of the interface, the API options were under the Integrations tab, but they have now moved to Arduino Cloud, which is available at https://cloud.arduino.cc/home/.
After visiting the Integration page, click on API Keys, and then you will be taken to the API page. Click on CREATE API KEY. A popup will appear; provide a name for the API, and click on the CONTINUE button. The wizard that appears will take a few seconds to generate the keys, and then a new popup will appear displaying the keys, as shown in Figure 13.1.