Skip to content

SSP Integration Telegram Native

Request

Telegram integration is implemented with a POST request containing a JSON object in its body.

http
POST http://{ssp_id}.xml.adx1.com/telegram-bid

The Simplest Request Body Sample

json
{
 "ip": "192.112.192.11",
 "user_agent":"Mozilla/5.0 (Linux, Android 14; K) AppleWebKit/537.36 (KHTML, lke Gecko) Chrome/129.0.6668.81 Mobile Safari/537.36 Telegram-Android/11.2.0 (Google Pixel 6; Android 14; SDK 34; HIGH)",
 "publisher_id":"792361"
}

Full Request Body Sample

json
{
 "ip": "192.112.192.11",
 "user_agent":"Mozilla/5.0 (Linux, Android 14; K) AppleWebKit/537.36 (KHTML, lke Gecko) Chrome/129.0.6668.81 Mobile Safari/537.36 Telegram-Android/11.2.0 (Google Pixel 6; Android 14; SDK 34; HIGH)",
 "publisher_id":"792361",
 "widget_id":"351352",
 "bid_floor":0.0001,
 "premium": true,
 "motivated": true,
 "language_code":"en",
 "telegram_id": "515279737",
 "blocked_categories": [18, 30],
 "number_of_bids": 3,
 "width": 150,
 "height": 100,
 "production": true
}

Request JSON Attributes

API Request Parameters

ParameterTypeRequiredDescription
ipStringYesUser IP address (IPv4/IPv6 supported)
user_agentStringYesUser agent string
publisher_idStringYesPublisher ID
language_codeStringNoUser language in alpha-2 format
widget_idStringNoMini App ID
telegram_idStringNoTelegram ID number
bid_floorDoubleNoMinimum bid expressed in CPC or CPM depending on SSP configuration
number_of_bidsIntegerNoNumber of bids in response (default: 1 if not specified)
blocked_categoriesList of integersNoBlocked advertiser category IDs (see Appendix A)
premiumBooleanNoIndicates if the user is premium (default: false if not specified)
motivatedBooleanNoIndicates whether the user action was motivated or not
widthIntegerNoWidth of requested creative (in pixels)
heightIntegerNoHeight of requested creative (in pixels)
productionBooleanNoIndicates production mode (default: true if not specified). Use false for test responses during integration.

Notes:

  • Required parameters must be included in all requests
  • When production=false, test responses will be returned for integration verification
  • Default values are applied when optional parameters are omitted:
    • number_of_bids: 1
    • premium: false
    • production: true
  • All parameters are case-sensitive
  • Dimensions (width/height) should be specified in pixels when required

Response Sample

json
[
   {
      "title":"test",
      "description":"test",
"image":"https://us.boxif.xyz/nty/metrics/save.img?event=impressions&bid-id=v2-1728914821764-14-14065-1373881-17047345-5c5c-bf4e-e314-fc908803c0a4&img=https%3A%2F%2Fcdn.amnew.net%2Ffiles%2F66d6d40333b3b_2024_09_03_09_16_51_image.webp",
"image_preload":"https://cdn.amnew.net/files/66d6d40333b3b_2024_09_03_09_16_51_image.webp",
"notification_url":"https://us.boxif.xyz/nty/metrics/save?event=impressions&bid-id=v2-1728914821764-14-14065-1373881-17047345-5c5c-bf4e-e314-fc908803c0a4", "link":"https://us.boxif.xyz/nty/postback/click?key=v2-1728914821764-14-14065-1373881-17047345-5c5c-bf4e-e314-fc908803c0a4",
      "bid_price":0.0000093
   },
   {
      "title":"test",
      "description":"test",   
"image":"https://us.boxif.xyz/nty/metrics/save.img?event=impressions&bid-id=v2-1728914821764-14-14065-1373881-068d4342-f9af-e153-437b-430ef038d5b5&img=https%3A%2F%2Fcdn.amnew.net%2Ffiles%2F66d6d40333b3b_2024_09_03_09_16_51_image.webp",
"image_preload":"https://cdn.amnew.net/files/66d6d40333b3b_2024_09_03_09_16_51_image.webp",
"notification_url":"https://us.boxif.xyz/nty/metrics/save?event=impressions&bid-id=v2-1728914821764-14-14065-1373881-17047345-5c5c-bf4e-e314-fc908803c0a4",
      "link":"https://us.boxif.xyz/nty/postback/click?key=v2-1728914821764-14-14065-1373881-068d4342-f9af-e153-437b-430ef038d5b5",
      "bid_price":0.0000093
   }
]

Response JSON Attributes

Creative Response Parameters

ParameterTypeDescription
titleStringCreative Title
descriptionStringCreative Description
imageStringLink to creative icon
image_preloadStringLink to creative banner
notification_urlStringNotification URL for impression tracking
linkStringClick URL
bid_priceDoubleBid price expressed in CPC or CPM depending on SSP configuration

Important Notes:

  • All URLs (image, image_preload, notification_url, link) must be properly encoded
  • image and image_preload should point to publicly accessible resources
  • notification_url will be pinged when the impression is recorded
  • bid_price unit depends on SSP configuration (could be CPC or CPM)
  • All fields are case-sensitive

Appendix A. Advertiser Categories

Advertiser Categories

IDCategory Name
18Finance - Other
30Travel
36Nutra - Weight Loss
37Nutra - Brain Booster
38Nutra - Dermatology
39Nutra - Hair loss
40Nutra - Parasites
41Nutra - Bones & Joints
42Nutra - Diabetis
43Nutra - Eye & Vision
44Nutra - Foot Health
45Nutra - Hemorrhoid
46Nutra - Papilloma
47Nutra - Psoriasis
48Nutra - Sleep
49Nutra - Varicosis
50Nutra - Other
51Gambling - Casino
52Gambling - Betting
53Gambling - Poker
54Gambling - Other
55Sweepstakes - Gift Cards Global
56Sweepstakes - Electronics
57Sweepstakes - Gift Cards Local
58Sweepstakes - Other
59Dating - Regular Mainstream
64Dating - Other
65E-commerce - Fashion
66E-commerce - General Ecommerce
67E-commerce - Shopping
68E-commerce - Other
69Finance - Regular trading
70Finance - Insurance
71Finance - Binary options
72Finance - Credit / Debt & Loans
73Finance - Financial Infoproducts
74Finance - Banking
75Finance - Crypto Trading
76Finance - Crypto ICO
77Games - Browser Game
78Games - PC Game
79Games - Google Play Game
80Games - Other
81Job search - Other
82Software & Apps - Antivirus
83Software & Apps - VPN
84Software & Apps - Utility
85Software & Apps - Other
86Media - Blogs & Media
87Media - Videos on Demand
89Media - Other
90Traffic Arbitrage - Search Arbitrage
91Traffic Arbitrage - Push Subscriptions
93Traffic Arbitrage - Other
94Telecom - Mobile Carriers Plan
95Telecom - Mobile Carriers Content
96Telecom - Other
97Other - Uncategorized
98Other - LP N/A
99Multiple offers - Other
100Automotive - Other
103Automotive - Buying/Selling Cars
104Automotive - Car Parts
105Business - Brand page
106Business - Services
107Business - Education
108Business - Medical
109Nutra - Blood & Blood Vessels
110Sweepstakes - Cash reward
111Surveys & Questionnaires
112Finance - Investing
114Software & Apps - Cleaners
115Media - Local News
116Media - Global News

Usage Notes:

  • These IDs are used in the blocked_categories parameter to filter unwanted ad categories
  • Multiple categories can be blocked by providing an array of these IDs
  • Category names follow "Parent - Subcategory" format for better organization