Authentication

You'll need to authenticate your requests to access any of the endpoints in the EarnFM API. In this guide, we'll look at how authentication works.

Basic authentication

With basic authentication, you use your API Key to authenticate your HTTP requests. Here's how you can authenticate your requests using cURL:

Example request with basic auth

curl https://api.earn.fm/v2/my_info \
  --header 'X-API-KEY: [API KEY]'

Please don't commit your EarnFM API Key to GitHub!