HA + Human sensor + IspyAgentDVR + Telegram

Hi all.
I have Human detection sensor based on esphome and HA automation. It sends notification in my telegram bot. It works fine! I also have IP cameras connected to AgentDVR. Is it possible to make request from HA to AgentDVR when human sensor triggers to make photos and send photos to telegram? I see AgentDVR has API for that. But I can’t understand how to transfer photos between AgentDVR, HA and telegram bot. Thanks in advance!