After signing up, you'll be given your own, unique API key. This 40 character string is your API key. The key:
To use your key, simply pass the key as a URL query parameter when making Web service requests. For example:
GET https://developer.nrel.gov/api/alt-fuel-stations/v1.json?limit=1&api_key=YOUR_KEY_HERE
Your API key may be passed to the service in a few different ways. Pick which ever method is easiest for you.
Pass the API key into the X-Api-Key
header:
curl -H 'X-Api-Key: DEMO_KEY' 'https://developer.nrel.gov/api/alt-fuel-stations/v1.json?limit=1'
Pass the API key into the api_key
GET query string parameter:
curl 'https://developer.nrel.gov/api/alt-fuel-stations/v1.json?limit=1&api_key=YOUR_KEY_HERE'
Note: The GET query parameter may be used for non-GET requests (such as POST and PUT).
As an alternative, pass the API key as the username (with an empty password) using HTTP basic authentication:
curl 'https://YOUR_KEY_HERE@developer.nrel.gov/api/alt-fuel-stations/v1.json?limit=1'