[HTTP] "Could not find authentication result for..."

I have the following configuration:

Thing http:url:solar "Solar forecast" [
	baseURL = "https://api.solcast.com.au/rooftop_sites/xxxxxxxxx/forecasts?hours=24&format=json",
	refresh = "1800",
	timeout ="10000",
	ignoreSSLErrors = "true"
]
{
	Channels:
		Type string : raw_data [
			mode = "READONLY"
		]
}

…but am failing to retrieve any data. This is the only log entry related to this:

21:47:50.035 [WARN ] [p.internal.http.RateLimitedHttpClient] - Could not find authentication result for 'https://api.solcast.com.au/rooftop_sites/xxxxxxxxx/forecasts?hours=24&format=json', failing here

I can succesfully put the same URL into the address bar of my browser and the JSON data shows up without issue.

Anyone know what to try next?

Well this is embarrassing - it’s because I didn’t include the API key as part of the URL.

It worked on the browser only because I was logged into the site on the same browser. Sneaky…

For posterity:

Thing http:url:solcast "Solar forecast" [
	baseURL = "https://api.solcast.com.au/rooftop_sites/<siteID>/forecasts?hours=24&format=json&api_key=<apiKey>",
	refresh = "1800",
	timeout ="10000",
	ignoreSSLErrors = "true"
]
{
	Channels:
		Type string : raw_data [
			mode = "READONLY"
		]
}
1 Like