Telegram Bot API
🌐 Español

sendLivePhoto

Categoría: Multimedia · Bot API 10.3 · Documentación oficial

Envía una Live Photo (foto + video, Bot API 10.0).

Devuelve: Si la llamada tiene éxito, devuelve Message.

Parámetros

ParámetroTipoObligatorioDescripción
business_connection_idStringOpcionalID de la conexión empresarial
chat_idInteger or StringSíID del chat o @username
message_thread_idIntegerOpcionalID del tema del foro
direct_messages_topic_idIntegerOpcionalID del tema de mensajes directos (Bot API 10.0)
ephemeral_message_parametersEphemeralMessageParametersOpcionalObjeto JSON EphemeralMessageParameters — mensaje efímero visible para un solo usuario (Bot API 10.3)
live_photoInputFile or StringSíVideo de la Live Photo (URL/file_id, máx. 10 s, 10 MB)
photoInputFile or StringSíFoto estática (URL/file_id)
captionStringOpcionalLeyenda (0-1024)
parse_modeStringOpcionalHTML, Markdown o MarkdownV2
caption_entitiesArray of MessageEntityOpcionalArray JSON de MessageEntity para la leyenda
show_caption_above_mediaBooleanOpcionalMostrar la leyenda encima del contenido multimedia
has_spoilerBooleanOpcionalOcultar el contenido (spoiler)
disable_notificationBooleanOpcionalEnviar sin sonido
protect_contentBooleanOpcionalProteger el contenido
allow_paid_broadcastBooleanOpcionalPermitir difusión de pago
message_effect_idStringOpcionalID del efecto del mensaje
suggested_post_parametersSuggestedPostParametersOpcionalObjeto JSON SuggestedPostParameters
reply_parametersReplyParametersOpcionalObjeto JSON ReplyParameters
reply_markupInlineKeyboardMarkup or ReplyKeyboardMarkup or ReplyKeyboardRemove or ForceReplyOpcionalObjeto JSON: InlineKeyboardMarkup / ReplyKeyboardMarkup / ReplyKeyboardRemove / ForceReply

Las descripciones de los parámetros son resúmenes breves; consulta la documentación oficial para ver el texto completo.

Ejemplo de solicitud

curl

curl -s -X POST "https://api.telegram.org/bot$TOKEN/sendLivePhoto" \
  -H "Content-Type: application/json" \
  -d '{
  "chat_id": 123456789,
  "live_photo": {},
  "photo": "https://telegram.org/img/t_logo.png"
}'

Python

import requests

TOKEN = "123456789:AAEexampleTokenReplaceWithYours"
resp = requests.post(
    f"https://api.telegram.org/bot{TOKEN}/sendLivePhoto",
    json={
        "chat_id": 123456789,
        "live_photo": {},
        "photo": "https://telegram.org/img/t_logo.png"
    },
    timeout=30,
)
print(resp.json())

JavaScript

const TOKEN = "123456789:AAEexampleTokenReplaceWithYours";
const res = await fetch(`https://api.telegram.org/bot${TOKEN}/sendLivePhoto`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chat_id": 123456789,
    "live_photo": {},
    "photo": "https://telegram.org/img/t_logo.png"
  }),
});
console.log(await res.json());

Guía paso a paso: Cómo crear un bot en Telegram paso a paso: de BotFather a tu primer mensaje