Linking a ESPhome camera to motioneye

So I created a camera using the ESP home configuration (https://pastebin.com/eD0DXLfE) and I display nicely in the home assistant dashboard but I want to add it to motioneye I can use this url: http://HOMEASSISTANTIP:8123/api/camera_proxy_stream/camera.esp_camera_1?token=SHORTLIVETOKEN but unfortunatly it stop after the token expires so I tried to create a long lived token but i get a 401 Unauthorized so any one as alreday used a camera proxy externaly ?

6 Likes

I have The same problem

Hi
You find any solution to this issue ?

hello,
same :frowning:

I’m trying to do the same right now. It seems that the link api/camera_proxy_stream/camera.esp_camera_1 is a rest api that only works with auth requests, and motionEye doesn’t really handle those?

Basicly a bump to the topic, and was anyone able to solve this?

Bump!
Also my I m interested :slight_smile:

I also need this was not able to use the longlive token in Blueiris

Interested as well!

Only short lived tokens can be used with the ?token query string. To use a long lived token, you need to add the header Authorization: Bearer ABCD.

This can be done by using the Nginx addon and using it as a reverse proxy, adding the header you want. Make sure to use server_name localhost;, otherwise you would be allowing other devices to authorise using that long lived token.

Thx for your input. Could you provide an example string?