API keys are an essential part of your GitHub Actions workflows,
api scripts, or any other integrations you choose to build with the ReadMe API. Thankfully, the ReadMe dashboard and ReadMe docs provide a variety of tools so you can quickly get up and running with authenticated API requests.
The first thing you should do is log into the ReadMe docs if you haven't already done so. Any API keys associated with your account should automatically be populated above. Here's what mine look like when I'm logged in:
Once you've selected an API key, you'll see it's been automatically populated in the authentication field in the top-right corner (where it says How to Authenticate). Below that is a little API playground where you can send an authenticated request. Click that big blue "Try It!" button and see what happens!
You can copy the cURL request, which is fully runnable. Try pasting that into a terminal of your choice and you should see the exact same results. 🚀
Like what you see? 👀
Everything that you're seeing in these reference docs is possible to set up with your API and your developer hubs! If you want your users to have a customized developer hub experience, complete with:
- A list of their API keys 🔑
- "Try It!" functionality to quickly make authenticated requests 🚀
- Request history logs on your endpoint pages 🪵
If this is your first time using the ReadMe API, you'll likely need to generate a new API key for your project. You can do this by navigating to the following in the project dashboard:
- Click Configuration
- Click API Keys
- Generate your first API key! You can do this by clicking the big blue button in the top right corner and following the steps in the pop-up modal:
- You've generated your first API key! Try sending a sample request:
curl https://dash.readme.com/api/v1 -X GET -u "<<id>>:"
We recommend generating different API keys for different purposes so you don't have a single point of failure if one of your API keys is exposed. Once you've generated a few keys (and added some helpful labels!), it should look a little something like this:
If one of your API keys has been leaked or if you have any security concerns about a particular API key, we strongly recommend you rotate out your API keys. You can do so by taking the following steps:
- Delete the exposed API key in your dashboard (there is a Delete option if you click the three dots on the right-hand side) 🚮
- Re-generate a new API key in its place 🆕
- Replace any usage of the leaked API key with the new one 🔄
We've partnered with GitHub to ensure your API keys remain safe. 🔐
If a ReadMe API key is accidentally pushed to a public GitHub repository, we will automatically be notified via GitHub's secret scanning program. We will immediately invalidate the API key and notify the project administrators of the leak via email. If this happens to you, follow the steps above to regenerate your API key.
Updated 24 days ago