Company
Date Published
Author
RapidAPI Staff
Word count
1501
Language
English
Hacker News points
None

Summary

The COVID-19 data API is a Freemium API that offers a free tier with limitations for testing purposes. To connect to the API, an API key must be obtained and passed between software applications and the API as a unique identifier and secret authentication token. The API key can be hidden in environment variables or binary files to prevent exposure in scripts. Two methods are used to hide and retrieve the API key: environment variables and binary files. Environment variables can be set on Windows OS by navigating to Control Panel, System and Security, System, and Advanced System Settings, while Mac OS / Linux OS requires modifying a .bash_profile file. Binary files can be created using a Python script that writes the API key to a binary file. The API key can be retrieved from environment variables or binary files using Python scripts. The COVID-19 data API offers various endpoints for retrieving data, including confirmed cases, critical cases, fatalities, and recoveries. By following these steps, developers can access the API's endpoints with their API keys hidden.