mirror of
https://github.com/bohd4nx/FragmentAPI.git
synced 2026-07-25 22:31:41 +00:00
1019 B
1019 B
Ads
Ads methods cover two different actions:
- sending TON to a user,
- recharging your own Telegram Ads account.
topup_ton
await client.topup_ton(
username: str,
amount: int,
show_sender: bool = True,
) -> AdsTopupResult
Rules:
username: recipient Telegram usernameamount: integer from1to1_000_000_000show_sender: sender visibility
Important: amount must be an integer in allowed range.
recharge_ads
await client.recharge_ads(
account: str,
amount: int,
) -> AdsRechargeResult
Rules:
account: channel/bot username linked to your ads accountamount: integer from1to1_000_000_000
Returns
AdsTopupResult(transaction_id, username, amount)AdsRechargeResult(transaction_id, amount)
Common errors
ConfigurationErrorUserNotFoundError(topup recipient)WalletErrorVerificationError