Hi,
I’m trying to create my own REST sensor using an API call for De Lijn. My ultimate goal is to use a variable from an input text field to do the REST Call.
When I try the rest api without using a variable. I already get an error.
Because my REST api needs a specific header see code below:
- platform: rest
resource: https://api.delijn.be/DLKernOpenData/v1/beta/haltes/1/102846/real-time
method: GET
headers:
Ocp-Apim-Subscription-Key: !secret DeLijnApi-Key
Alas when I put the field of this header, the sensor is not created within home assistant.
If I omit the line “Ocp…” then the rest sensor is created but gives an authentication error, as it needs this header.
What am I doing wrong in using the specific header for this api?