-
-
Notifications
You must be signed in to change notification settings - Fork 71
Description
Hi everyone,
I’ve been searching through the issues but couldn’t find anything related to this problem.
I’m running into an issue with the Telegram Bot API when trying to send an image URL generated by Jellyfin.
Jellyfin sends the following webhook:
{
"chat_id": "<chat_id>",
"photo": "https://jellyfin.example.com/Items/8c9416b8-19f7-f70a-8e92-ff6ef9e355b6/Images/Primary.jpg",
"caption": "<b>Movie Now Available</b>\n\n<b>My Best Movie (2025)</b>\nDescription here",
"parse_mode": "html",
"protect_content": true
}The Telegram API responds with:
{
"ok": false,
"error_code": 400,
"description": "Bad Request: wrong type of the web page content"
}I also tried sending the same request using curl:
curl -X POST "https://api.telegram.org/bot<token>/sendPhoto" \
-H "Content-Type: application/json" \
-d '{
"chat_id": "<chat_id>",
"photo": "https://jellyfin.example.com/Items/8c9416b8-19f7-f70a-8e92-ff6ef9e355b6/Images/Primary.jpg",
"caption": "<b>Movie Now Available</b>\n\n<b>My Best Movie (2025)</b>\nDescription here",
"parse_mode": "html",
"protect_content": true
}'I get the exact same error:
{
"ok": false,
"error_code": 400,
"description": "Bad Request: wrong type of the web page content"
}After checking the image URL with curl, I noticed it returns this header:
content-disposition: attachment
This header forces the client to download the image instead of displaying it inline.
I’m wondering if this could be the cause of the issue. Maybe Telegram rejects images served with content-disposition: attachment?
It’s unclear whether this behavior changed on Telegram’s side or Jellyfin’s side, but it seems related to how Jellyfin serves images.
For comparison, sending an image from a standard public URL works without any issues, for example:
https://images.wallpapersden.com/image/wxl-wednesday-2-iphone-jenna-ortega_93159.jpg
Has anyone run into a similar issue?
Jellyfin version: 10.11.6