Appearance
SSP/Publisher Integration Telegram Bot Message
Request
Telegram integration is implemented with a POST request containing a JSON object in its body. - Request your SSP ID from the RichAds Manager.
http
POST http://{{ssp_id}}.xml.adx1.com/telegram-mb
The Simplest Request Body Sample
json
{
"language_code": "en",
"publisher_id": "792361"
}
Full Request Body Sample
json
{
"language_code": "en",
"publisher_id": "792361",
"widget_id": "351352",
"bid_floor": 0.0001,
"telegram_id": "515279737",
"production": true
}
API Parameters Reference
Parameter | Type | Required | Description |
---|---|---|---|
language_code | String | Yes | User language in alpha-2 format |
publisher_id | String | Yes | Publisher ID |
widget_id | String | No | Mini App ID |
telegram_id | String | No | Telegram ID number |
bid_floor | Double | No | Minimum bid expressed in CPC or CPM depending on SSP configuration |
production | Boolean | No | Indicates whether the request is made in production mode. false is used for initial tests to ensure that SSP is integrated correctly (test responses will be returned). Defaults to true if not specified. |
Response Sample
json
[
{
"title": "test",
"message": "tests",
"image": "https://eu.boxthis.xyz/nty/metrics/save.img?event=impressions&bid-id=v2-1746187564185-14-14868-1428851-229a33a2-bbff-75bb-6895-31a1cd9e56b9&img=https%3A%2F%2Fcdn.amnew.net%2Ffiles%2F67196851bf7f0_2024_10_23_09_19_13_image.jpeg",
"link": "https://eu.boxthis.xyz/nty/postback/click?key=v2-1746187564185-14-14868-1428851-229a33a2-bbff-75bb-6895-31a1cd9e56b9",
"image_preload": "https://cdn.amnew.net/files/684ad59345c6f_2025_06_12_01_26_43_image.jpeg",
"notification_url": "https://eu.boxthis.xyz/nty/postback/click?key=v2-1746187564185-14-14868-1428851-229a33a2-bbff-75bb-6895-31a1cd9e56b9",
"brand": "",
"button": "test",
"bid_price": 0.31,
"creative_type": "message bot",
"creative_id": 3702907,
"updated_at": 1754998719,
}
]
Response JSON Attributes
Parameter | Type | Description |
---|---|---|
title | String | Creative Title |
message | String | Creative Message |
image | String | Link to creative banner |
link | String | Click URL |
brand | String | Brand Text |
image_preload | String | Image direct path |
notification_url | String | Impression notification URL |
button | String | Button Text |
bid_price | Double | Bid price expressed in CPC or CPM depending on SSP configuration |
creative_type | String | Creative Type |
creative_id | Integer | Creative ID |
updated_at | Timestamp | Creative Updated Date and Time |
1. Request ad from RichAds
http
curl -X POST "http://{{ssp_id}}.xml.adx1.com/telegram-mb" \
-H "Content-Type: application/json" \
-d '{
"language_code": "en",
"publisher_id": "792361",
"widget_id": "351352",
"bid_floor": 0.0001,
"telegram_id": "515279737",
"production": true
}'
2. Send received ad from RichAds to your bot
http
curl --location 'https://api.telegram.org/bot<YOUR_BOT_TOKEN>/sendPhoto' \
--form 'chat_id="123456789"' \
--form 'photo="https://eu.skated.co/nty/metrics/save.img?event=impressions&bid-id=v3-14-14768-1447584"' \
--form 'caption="Great White Buffalo Offer! Get Your 40 Free Spins Now With Promo Code 40GWB!🎁"' \
--form 'reply_markup="{\"inline_keyboard\":[[{\"text\":\"GO\!\",\"url\":\"https://eu.skated.co/nty/postback/click?key=v3-14-14768\"}]]}"'