Testing
Telegram examples. Choose your platform →
Check ad selection, Telegram delivery, and callbacks separately. An ad in an API response does not confirm that Telegram delivered it.
Choose a format
text: /ad or /ad/fetch.image: /ad/fetch withaccept_formats: ["image"]or /ad/fetch-image.response,card,consent,quiz: /ad with the requiredaccept_formatsandcapabilities. Rich format parameters.
accept_formats limits eligible formats; it does not guarantee matching active inventory. A no-ad response alone does not indicate an integration error.
Test platforms
Telegram test mode may return regular ads and does not disable impression billing.
The HTTP parameter test_rich: true requests rich-format test ads. text and image are not supported. A no-ad response is possible. SDK 0.8.0 does not send this parameter.
Verification checklist
- No ad or API failure: the user receives the original reply and keyboard.
- Text: links and parse_mode work, and the bot's reply is not duplicated.
- Image: photo and animation are sent using the corresponding media_type.
- Rich: the ad is sent after the reply; a delivery failure uses the same ad's text fallback.
- Consent and quiz: check all scenes, decline, repeated taps, and answerCallbackQuery.
- Impressions and clicks: allow for reporting delay; do not request another ad just to retry Telegram delivery.
Groups and ephemeral
Ephemeral is a delivery mode, not an ad format. For an initial rich scene, pass group_id and bot_is_admin, then add receiver_user_id when sending. SDK 0.8.0 does not send group_id, so use HTTP for group-aware requests.