How to use RESTFUL in trusted_network without authentication(token)?

I have a Synology Surveillance Station(SS) in my home, and configured the Synology integration in HA. The cameras and sensors works well.

One feature lacking in this integration is motion_detection. The workaround is to let SS use webhook to send a motion_detection event to HA, using the RESTFUL API. However, RESTFUL API requires a token in the header (Authorization: Bearer) of the request, which isn’t customizable in Synology SS webhook. (in only let you select GET/POST and the request body)

I found a post from 2018 and the solution was to add trusted_network. This didn’t work for me though. I still received a 401: Unauthorized even if in the same network with curl call.

The configuration of trusted network is:

  name: My Home
    - type: homeassistant
    - type: trusted_networks
        - # my home network

Curl resuest:

curl -X POST -H "Authorization: Bearer " \
  -H "Content-Type: application/json" https://<my_lan_domain>:8123/api/events/fire

Does HA support other auth-less restful request? Thanks.

Btw, there’s nothing wrong with the trusted network as I can login without password in the browser.

Further on in the post you referenced which I’ve been active in was full instructions on how to use a webhook rather the the REST API. That can be found here. That’s what I’m using and it works flawlessly.