Inputs.http throws 502, curl works

Hey there,
I’m pretty new to Telegraf itself and my goal is to get my power consumption monitored and visualized later on. For that matter I’ve installed a PowerOpti - and the API docs are pretty straight forward (only available in german, still, for reference: )
I prepared all the information upfront in Postman to get the correct curl command - which works like a charm.
Translating it into a telegraf config gives me a major headache.

My config looks like this:

  urls = ["" ]
  method = "GET"
  timeout = "5s"
  name_override = "CurrentWattage"
#  [inputs.http.headers]
#    Authorization = "Basic XXXX"

#  username = "mailAddress"
#  password = "YYYY"
  bearer_token = "/etc/telegraf/bearertoken"

  data_format = "json_v2"
#  timestamp_path = "Timestamp"
#  timestamp_format = "unix"

As you can see, I tried to test the different combinations already. Every combination results in

2022-01-17T16:53:40Z E! [inputs.http] Error in plugin: [url=]: received status code 502 (Bad Gateway), expected any value out of [200]

Whereas the curl command nets a proper result:

curl --request GET \
  --url \
  --header 'Authorization: Basic XXXX'              


Any idea how to proceed here?

After quite some research, I found at least a resolution, but I don’t understand why.
The URL is backed by a certificate from GoDaddy.
Adding insecure_skip_verify = true to the config was enough to get it going. But I don’t understand where Telegraf determines the certification path from?


I believe these paths are used by default, otherwise, you will need to provide a specific location.