Hi, I come with a problem. I have a camera added in the home assistant in the Frigate add-on. I am going to create a script that, for example, downloads snapshots from the camera. I have found a valid endpoint that works in the browser:
homeassistant.local:8123/api/hassio_ingress/<camera_proxy>/api/<camera_id>/latest.jpg
The snapshot appears.
I then tried to test this in Postman where:
headers = {
'Authorization': f 'Bearer {Long-Lived Access Token from Home Assistant}',
'Content-Type': 'application/json'
}
And it doesn’t work. It gets 401 no authorization. I noticed that ingress_session is passed to the Cookie in the browser. So when adding to the header.
'Cookie': 'ingress_session={ingress_token}'
Everything works correctly. However, it should not look like this. I should either be dynamically generating the token or downloading it. Has anyone encountered this?