注册
在使用广告功能之前,请先完成注册。
Before using the ad features, please complete registration.
创建 Platform
Platform 代表着您的 APP 或者 Website
Create a Platform
A platform represents your APP or Website.

App name: 您的 APP 名称
App name: Your APP's nameTelegram direct link: 您的 Telegram 应用的直接链接
Telegram direct link: Direct link to your Telegram appWeb app url: 您的应用的 URL
Web app URL: Your app's URL
Info
App owner 可以通过 BotFather 使用命令 /myapps
获取 Telegram direct link
App owners can use BotFather with /myapps
to get the Telegram direct link.
创建 Block
Block 代表着广告位,你可以创建多个广告位,来对比不同位置的效果
Create a Block
A block represents an ad slot. You can create multiple ad slots to compare performance at different positions.

Name: Block 的名称
Name: Block's nameReward Webhook URL: 当用户点击广告后(广告系统收到点击事件),Ton AI 会向这个 URL 发送请求,您可以在这里实现奖励发放
Reward Webhook URL: Once a user clicks an ad (click event), Ton AI sends a request to this URL for reward distribution.
Tips
如果您希望在您的网站上展示多个广告,我们建议您创建多个 Block,这样可以对比每个 Block的 转化效果。
If you want to show multiple ads on your site, we recommend creating multiple Blocks to compare conversion performance.
审核
每个 Platform 都需要经过 Ton AI 的审核,审核通过后才可以成为 Ton AI 的流量主
Moderation
Each Platform needs to go through Ton AI's moderation. Only approved platforms can become traffic sources for Ton AI.
Tips
在通过审核之前只能获取到测试广告,审核通过后才可以获取到正式广告
Before passing moderation, only test ads are available. After approval, you can access official ads.
获取 BlockId
在 Platform 详情页面,可以看到每个 Block 的信息,其中有一列 BlockId, 旁边有个复制按钮,点击复制即可
Get BlockId
In the Platform details page, find Block information and copy the BlockId using the button provided.
Reward Webhook
当用户点击广告后(广告系统收到点击事件),Ton AI 会向这个 URL 发送请求,您可以在这里实现奖励发放
Reward Webhook
When a user clicks an ad, Ton AI sends a request to this URL to distribute rewards.
请求方法
Request Method: POST
请求参数
Request Parameters
参数名 | 位置 | 类型 | 描述 |
---|---|---|---|
adBlockId | query | string | 广告位 ID,从平台 -> 广告位 -> ID 获取 |
adBlockId | query | string | Ad slot ID, retrieved from Platform -> Ad Slot -> ID |
openId | query | string | 用户的唯一标识,例如 telegramUserId |
openId | query | string | User's unique identifier, e.g. telegramUserId |
type | query | string | openId 对应的类型,目前仅支持 'telegram' |
type | query | string | Type corresponding to openId, currently only 'telegram' |
campaignId | query | string | 广告活动 ID |
campaignId | query | string | Campaign ID |
x-api-key | header | string | 您账户的 App Key,请对比校验该 Key,防止伪造 |
x-api-key | header | string | Your account's App Key. Verify this Key to prevent forgery |
eventType | query | string | 事件类型,支持 click、complete、conversion |
eventType | query | string | Event type, supports click, complete, conversion |
eventId | query | string | 事件 ID ,用于幂等处理 |
eventId | query | string | Event ID, used for idempotency |
注意,eventType 的值可以是:
Note: The values for eventType can be:
click : 用户点击了广告(注意:触发 click 事件,将不会继续发送 complete 事件)
click: User clicked the ad (note: clicking stops complete events)complete : 用户看完了 15s 的广告(未点击)
complete: User watched 15s of the ad (without clicking)conversion : 用户进入了广告主的页面(大部分情况下,你可以忽略该事件)
conversion: User visited advertiser's page (mostly can be ignored)
您可以根据产品的需求,来决定根据哪种事件发放奖励。
You can decide which event triggers rewards based on your product needs.
如果用户看完了广告就可以获得奖励,处理逻辑如下:
If a user gets rewards by watching the ad, use the following logic:
if (eventType === 'complete' || eventType === 'click') {
// 发放奖励
// Reward distribution
}
如果用户必须点击广告才能获得奖励,处理逻辑如下:
If a user must click the ad to earn rewards, use this logic:
if (eventType === 'click') {
// 发放奖励
// Reward distribution
}
注意事项
Important Notes
系统可能会多次请求 Reward Webhook,请确保您的逻辑是幂等的,可以根据 eventId 进行幂等判断
The system may request the Reward Webhook multiple times. Ensure your logic supports idempotency using eventId.您应该对比校验 App Key,防止伪造
Verify your App Key to prevent forgery.