Can't send photo to Telegram

Hi,

I try to send a photo by URL to Telegram from an IP camera when motion is detected. There are more subjects of this problem on this forum, but all with sending a file. In my case the photo is captured by URL.

This is the automation:’

alias: Test foto
description: ''
trigger:
  - type: motion
    platform: device
    device_id: daac9ca874aee5d729abbeeaa2914803
    entity_id: binary_sensor.myfielddetector1_field_detection
    domain: binary_sensor
condition: []
action:
  - service: telegram_bot.send_photo
    data:
      url: http://192.168.0.15/Streaming/channels/1/picture
      caption: Voortuin
      username: XXXX
      password: XXXX
mode: single

This are the errors:

Logger: homeassistant.components.telegram_bot
Source: components/telegram_bot/init.py:798
Integration: Telegram bot (documentation, issues)
First occurred: April 5, 2022, 11:28:56 PM (15 occurrences)
Last logged: 4:10:23 PM

Could you format your code, see below.3

Camera is Hikvision