> ## Documentation Index
> Fetch the complete documentation index at: https://www.ayrshare.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Telegram API

> Telegram APIを使用した投稿オプション

## Telegramへの投稿

Telegram APIを使用してリンクと画像を含む基本的な投稿のJSON:

```json Telegram Post theme={"system"}
{
  "post": "The best Telegram message ever #best https://www.telegram.com", // empty string is allowed
  "mediaUrls": ["https://img.ayrshare.com/012/gb.jpg"],
  "platforms": ["telegram"]
}
```

画像や動画が含まれていない限り、Telegramはチャンネルまたはグループ内で自動的にリンクをプレビュー表示します。上記の例では画像が表示されます。画像を削除すると、リンクプレビューが表示されます。

動画がmp4などの既知の動画拡張子で終わっていない場合は、`isVideo`パラメータを使用してください。詳細は[/postエンドポイント](/apis/post/post)を参照してください。

詳細については[Telegramのメディアガイドライン](/media-guidelines/telegram)および[Telegramの認可](/dashboard/connect-social-accounts/telegram)を参照してください。

## アニメーションGIF

TelegramのアニメーションGIFでは、URLは1つのみ許可されます。メディアURLが「.gif」または「.GIF」で終わっていない場合は、`isVideo`フィールドを`true`に設定してください。

```json Telegram Animated GIF theme={"system"}
{
    "randomPost": true,
    "platforms": [
        "telegram"
    ],
    "isVideo": true,    // Set to true if the mediaURL does not end in .gif or .GIF
    "mediaUrls": ["https://img.ayrshare.com/012/cat.gif"]
}
```

## Telegramメンション

投稿テキストに`@handle`を追加することで、別のTelegramハンドルをメンションします。例:

```json Telegram Post with Mention theme={"system"}
{
  "post": "The best Telegram image post ever @handle",
  "platforms": ["telegram"]
}
```

<Warning>
  メンションに関する[重要なルール](/testing/post-verification#mentions)を確認してください。
</Warning>

## 文字数制限

詳細については[Telegramの文字数制限](/help-center/technical-support/character_limits#telegram-character-limits)を参照してください。
