Quickstart
Get an ad showing in your Telegram Mini App in under 10 minutes.
1. Get a Kinz-ID
Register your Mini App in the AdsKinz partner workspace → Mini Apps → Add a Mini App. Choose which formats to enable (interstitial, popInterstitial, or both). Once approved you receive a kinzId that identifies your Mini App to AdsKinz.
2. Load the SDK
Add this script tag to your Mini App HTML, before your own application code:
html
<script src="https://competent-rebekkah-davelam-58380a6b.koyeb.app/sdk/kinz.js"></script>3. Initialize a controller
html
<script>
const AdController = window.AdsKinz.init({
kinzId: "your-kinz-id",
format: "interstitial" // or "popInterstitial"
});
</script>4. Show an ad
Call .show() at a natural break point in your flow — after a level completes, before unlocking a feature, on a button tap. Never call it automatically on page load without user action: ads shown without a trigger point convert poorly and are more likely to be flagged by our anti-fraud system.
javascript
button.addEventListener("click", () => {
AdController.show()
.then((result) => {
// result.state is "completed" or "closed"
unlockFeature();
})
.catch((error) => {
// No ad available, or the user closed it early.
// Never punish the user for a failed or skipped ad.
console.log("Ad not shown:", error.code);
});
});Testing before going live
Your Mini App must be added and approved in your AdsKinz dashboard before
.show() returns real ads — until then calls reject with NO_FILL, which is expected and not a bug in your integration.