Referencia de Errores de API de TelegramGuía completa de solución de problemas con soluciones

Comprehensive reference for Telegram Bot API errors. Find solutions and troubleshoot common integration issues.

16 códigos de error
5 categorías
Bot API

Categorías de Errores

Authentication

3 errors

Chat

3 errors

Rate Limiting

3 errors

Media

4 errors

Content

3 errors

Todos los Códigos de Error

#Authentication

bot_blockedrefresh-token

The bot was blocked by the user or removed from the chat.

Solución:

The user has blocked your bot or removed it from the channel/group. Ask the user to unblock the bot or add it back as an administrator.

bot_kickedrefresh-token

The bot was kicked from the chat.

Solución:

Your bot was removed from this channel or group. The bot needs to be re-added as an administrator with posting permissions.

unauthorizedrefresh-token

Bot token is invalid or expired.

Solución:

The bot token is no longer valid. This could happen if the token was regenerated in BotFather. Reconnect your Telegram account.

#Chat

chat_not_founduser-error

The specified chat does not exist or the bot is not a member.

Solución:

The channel or group ID is invalid or the bot is not a member. Verify the chat ID is correct and the bot has been added as an administrator.

chat_write_forbiddenuser-error

The bot does not have permission to send messages in this chat.

Solución:

The bot lacks posting permissions in this channel/group. Ensure the bot is an administrator with 'Post Messages' permission enabled.

not_enough_rightsuser-error

The bot does not have sufficient admin rights.

Solución:

The bot needs additional admin permissions. Check that the bot has rights to post messages, send media, and any other required permissions.

#Rate Limiting

flood_controlretry

Too many requests. Telegram's flood control limit reached.

Solución:

You've exceeded Telegram's rate limits. Wait for the specified retry_after seconds before sending more messages. Late handles this automatically with queuing.

too_many_requestsretry

Rate limit exceeded. Please slow down.

Solución:

Too many API calls in a short period. Telegram limits are approximately 30 messages per second to different chats. Implement proper rate limiting.

retry_afterretry

Rate limited. Must wait before sending more messages.

Solución:

Telegram is enforcing a cooldown period. Wait for the specified duration before retrying. Late automatically handles this with exponential backoff.

#Media

file_too_largeuser-error

The file is too large to upload.

Solución:

Telegram has file size limits: photos up to 10MB, documents up to 50MB, videos up to 50MB. Compress your file or use a smaller version.

wrong_file_typeuser-error

The file type is not supported or the file is corrupted.

Solución:

Ensure your file is in a supported format (JPEG, PNG for images; MP4 for videos). Re-export the file and try again.

photo_invaliduser-error

The photo could not be processed.

Solución:

The image file is corrupted or in an unsupported format. Use JPEG or PNG format and ensure the image is not corrupted.

video_invaliduser-error

The video could not be processed.

Solución:

The video file is corrupted or uses an unsupported codec. Convert to MP4 with H.264 codec and AAC audio.

#Content

message_too_longuser-error

The message text exceeds the maximum length (4096 characters).

Solución:

Telegram messages are limited to 4096 characters. Shorten your message or split it into multiple messages.

caption_too_longuser-error

The media caption exceeds the maximum length (1024 characters).

Solución:

Media captions are limited to 1024 characters. Use a shorter caption or send the additional text as a separate message.

media_group_invaliduser-error

Invalid media group. Albums must contain 2-10 items of the same type.

Solución:

Media albums require 2-10 photos or videos. Ensure all items are the same type (all photos or all videos) and within the count limit.

Mejores Prácticas

Manejo de Errores

  • Implement automatic retries for flood control and rate limit errors
  • Handle bot_blocked errors gracefully and notify users to reconnect
  • Log all errors with chat IDs for debugging
  • Show user-friendly error messages in your UI

Consejos de Prevención

  • Verify bot permissions before sending messages
  • Compress images and videos before upload
  • Implement rate limiting (max 30 messages/second)
  • Always check message length before sending

Necesitas Ayuda con Telegram Integración?

Nuestra API maneja escenarios de error automáticamente con lógica de reintento inteligente y registro detallado.