Authentication with the Solcast API

Authentication with the Solcast API

Solcast Products

Evaluate Data AccessEvaluate Data AccessTesting the Solcast data APITesting the Solcast data API
Grid Aggregations
Typical Meteorological Year (TMY)
Horizon Angles
Historical Forecast

Data Modelling

Modelling - FAQsModelling - FAQs

Solcast API

What is an API request? How many API requests do I need?What is an API request? How many API requests do I need?
API Troubleshoot

Hobbyists and Researchers

Troubleshooting and FAQs

Data Troubleshooting and FAQsData Troubleshooting and FAQsWhat timezone are the timestamps?What timezone are the timestamps?

User Guides

Subscription ManagementSubscription ManagementAccount FAQs

Authentication with the Solcast API

The Solcast API allows several ways of authentication using your provided API key. Learn some of the methods you can use.

To show how to authenticate with the Solcast API, you can see the samples below. It is important to note that we’ll use “YOUR_APIKEY” as a replacement for your actual API key.

Pass as query string parameter

The easiest way is to just pass the API key as a query string parameter. For example, if you were trying to request the forecasts for your rooftop site, you would use the following URL.

GET https://api.solcast.com.au/rooftop_sites/abcd-1234-abcd-1234/forecasts?api_key=YOUR_APIKEY

As a curl command this would look like

curl -H "Accept: application/json" https://api.solcast.com.au/rooftop_sites/abcd-1234-abcd-1234/forecasts?api_key=YOUR_APIKEY

Pass as Bearer token within Authorization request header

If, for whatever reason, you prefer to send as a bearer token, it should be passed in the "Authorization" header with the "type" Bearer.

As a curl command this would look like

curl -H "Accept: application/json" -H "Authorization: Bearer YOUR_APIKEY" https://api.solcast.com.au/rooftop_sites/abcd-1234-abcd-1234/forecasts

Pass API as Basic authentication

For use with Basic authentication, the API key is passed only as the username with an empty password.

As a curl command this would look like

curl -H "Accept: application/json" -u YOUR_APIKEY: https://api.solcast.com.au/rooftop_sites/abcd-1234-abcd-1234/forecasts

If you are still having problems authenticating with our API or want to suggest improvements to this article, please reach out to us - support@solcast.com.au.