Using media_source as clickAction URL in a notification

I’m trying to attach a video to a notification and have home assistant play the video when I tap on the notification. I was able to attach the video using from a media_source using these instructions

I cannot get the video to play using a clickAction URL

service: notify.mobile_app_pixel_6
data:
  message: Front Door Recorded @4:50 PM
  data:
    video: /media/cctv/2023-10-03/16.49.41-16.50.03[M][0@0][0].mp4
    clickAction: media-source://media_source/cctv/2023-10-03/16.49.41-16.50.03[M][0@0][0].mp4

I’m pretty sure the URL is valid because it works with the play_media service

service: media_player.play_media
data:
  media_content_type: video/mp4
  media_content_id: media-source://media_source/cctv/2023-10-03/16.49.41-16.50.03[M][0@0][0].mp4
target:
  entity_id: media_player.nest_hub

I suspect it has to do with missing headers descibed in the attachments documentation

The media_source integration has the advantage that access requires authentication headers (which Home Assistant provides to the companion app). This means the content is not publicly available

I’ve also tried setting clickAction and video to the same path starting with /media/...mp4 without success. How do I provide the headers or is there an alternative method that works?

I wasn’t able to get a actionable notification to work either:

service: notify.mobile_app_pixel_6
data:
  message: Front Door Recorded @4:50 PM
  data:
    video: /media/cctv/2023-10-03/16.49.41-16.50.03[M][0@0][0].mp4
    actions:
      - action: "URI"
        title: "Watch"
        uri: media-source://media_source/cctv/2023-10-03/16.49.41-16.50.03[M][0@0][0].mp4

The documentation says to use the URI scheme:

To play media from a media source via a service call, use the uri scheme media-source://media_source/<media_dir>/<path>

but it doesn’t seem to work

EDIT:

Found out /meda shortcuts are a feature request that’s been open for a couple of years

This issue was also raised here

Not sure if media_source and /media shortcuts are failing due to the same underlying issue related to authentication. I’ll be awaiting the bug fix and will retry.

This works for me