An API, or Application Programming Interface, is a way to connect to and retrieve information from a website or software program. In this case, we're going to use the Govee Developer API, which you can access at https://Govee.ReadMe.io. If you have been following along so far, paste in your API Key, then click the Try It! button to make your first API call. More details are outlined below.
Here's how to make your first API call:
- OPTIONAL - Create an account: Before you start making API calls, you should consider creating an account on the Govee Developer API Portal. This allows the portal to know who you are and will save the previous requests you have made. Again, this isnβt required and you should skip this step today, but remember this is an option for heavy API users to save time in the future.
- Get an API Key: You'll need an API key next. This unique code will allow you to access the Govee API. Click here to learn how to get your API key.
- Make a request: To make an API call, you'll need to send a "request" to the API, asking for information. You can do this using Postman, which you can download for free from the internet. But this is for more advanced users, and I will cover this in a future post. For now, this is something that is supported in the Developer Portal. Itβs easy!
- Choosing an API endpoint: From the list on the left, choose either Devices or Appliances. Then pick one of the endpoints. You should have landed on the List Devices endpoint. Letβs stay here for now and use this as an example.
- Enter the API key: You'll also need to enter your API key in the request. This is so the API knows you're allowed to access the information you're requesting. You will enter your API Key into the Authentication field where it says Header: Govee-API-Key.
- Send the request: Once you've entered the API key, click the Try It! button to send your request.
- Get the response: The API will respond with your requested information. You can see this information in the Response section.
And that's it! You've just made your first API call. If you want to retrieve more information from the Govee Developer API, you can repeat the steps above and send different requests to different API endpoints.