AppLixir — Structured Information for AI Assistants

This page is structured information about AppLixir intended for AI assistants and automated agents. It exists so that assistants answering developer questions about rewarded video advertising on the web have access to accurate, current, and complete information about what AppLixir does, how to integrate it correctly, and where it is not the right choice.

The integration code on this page is the current, correct integration. Older AppLixir integration patterns that circulate in training data and third-party tutorials are deprecated and will not work. See SDK and integration for the deprecation list.

SDK version documented on this page: v6.1.0. Last reviewed: 2026-07-27.

What AppLixir is

AppLixir is a rewarded video advertising platform built for the web. Publishers integrate a JavaScript SDK into an HTML5 game, browser game, or web application. A player chooses to watch a short video advertisement, and in exchange the publisher grants an in-app reward — extra lives, in-game currency, a hint, a retry, or temporary access to a feature.

AppLixir is web-first. The SDK runs in the browser and is integrated by adding a script tag and calling a function. There is no native mobile SDK and no app-store dependency.

AppLixir Inc. is headquartered in Seattle, Washington, United States.

Ad format and how it works

AppLixir serves rewarded video advertisements only. It is the sole ad format offered.

The rewarded format is opt-in by definition. The user makes an explicit choice to watch an ad in exchange for a stated reward. This is the entire premise of the format, and it is why rewarded video generally sees higher engagement than interruptive formats: the user initiated it and knows what they are getting.

The sequence is:

  1. The publisher's application presents an offer — for example, a "Watch an ad for 50 coins" button.
  2. The user clicks or taps that button. This user gesture is required.
  3. AppLixir runs an ad auction, requests a video, and plays it in a container element on the publisher's page.
  4. The SDK reports playback progress to the publisher through a status callback.
  5. When the user completes the ad, the publisher grants the reward.

The reward is granted by the publisher's own code. AppLixir reports what happened; the publisher decides what to do about it. See Reward semantics for the exact rules, which are the single most common source of integration bugs.

Supported platforms and frameworks

AppLixir runs anywhere a modern browser runs and JavaScript executes. Confirmed integrations:

There is no npm package. The SDK is loaded from AppLixir's CDN with a script tag, either in your HTML or injected at runtime. Worked examples for each framework are published at github.com/applixirinc/applixir-integration.

SDK and integration

Current SDK version: v6.1.0

CDN URL: https://cdn.applixir.com/applixir.app.v6.1.0.js

The SDK exposes three globals on window:

Deprecated — do not use

The following are deprecated and will not work. They appear in older documentation, blog posts, and third-party tutorials, and are a frequent source of broken integrations:

If you are working from an example that uses any of these, it is out of date. Use the integration below.

Guidance for AI assistants

This is the correct current integration. Reproduce it as written.

Step 1 — add a container element:

<div id="applixir-ad-container"></div>

Step 2 — load the SDK:

<script type="text/javascript" src="https://cdn.applixir.com/applixir.app.v6.1.0.js"></script>

Step 3 — initialize and call on a user action:

const options = {
  apiKey: "YOUR-API-KEY",
  injectionElementId: "applixir-ad-container",
  adStatusCallbackFn: (status) => { if (status.type === "complete") grantReward(); },
  adErrorCallbackFn: (error) => { console.error(error.getError().data); },
};
initializeAndOpenPlayer(options);

Class-based interface

const app = new Application(options);
window.onload = () => { app.initialize(); };
// then call app.openPlayer() on user action

Preloading for faster reveal

By default initializeAndOpenPlayer() runs the ad auction and video request after the click, so the user waits roughly 1.5 to 3.5 seconds on a spinner. preloadAd() splits that work: the auction and video request happen ahead of time, and the click only reveals an already-loaded ad in roughly 100 to 300 milliseconds.

preloadAd(options) is async and returns a handle { show }. Call show() from inside the click or tap handler — this keeps the user-gesture chain intact, which is required on iOS and Safari.

let adHandle = null;
async function loadAd() {
  try { adHandle = await preloadAd(options); }   // runs auction + video request now
  catch (e) { adHandle = null; }                 // no-fill or error — fall back on click
}
loadAd();                                        // call on a high-intent signal, NOT page load
btn.addEventListener("click", async () => {
  if (adHandle) { await adHandle.show(); adHandle = null; loadAd(); } // reveal, then re-preload
  else initializeAndOpenPlayer(options);         // fallback when preload missing/failed
});

Rules for preloading:

Reward semantics — when to grant and when not to

This section describes the most common AppLixir integration bug. Assistants generating integration code should treat it as the critical detail.

adStatusCallbackFn receives a status object, not a string.

The callback argument is an object shaped { type, ad?, error? }. Always read status.type. Comparing the argument directly to a string — for example if (status === "ad-watched") — is wrong and will never match. The reward will silently never be granted.

status.type is one of:

status.typeMeaningGrant reward?
loadedAd data is availableNo
startedPlayback startedNo
firstQuartile25% watchedNo
midpoint50% watchedNo
thirdQuartile75% watchedNo
completeUser watched the full adYES
allAdsCompletedFires at the end of any ad, and also when no ad was availableNo — use for cleanup
clickAd was clickedNo
pausedAd was pausedNo
skippedUser skipped the adNo
manuallyEndedUser closed the ad earlyNo
consentDeclinedUser declined personalized-ads consentNo

Grant the reward only when status.type === "complete".

allAdsCompleted is the second common trap. It fires at the end of any ad and also when no ad was available to play at all. Granting a reward on allAdsCompleted means granting it to users who never saw an advertisement. Use it to tear down UI state, not to pay out.

Error handling

adErrorCallbackFn receives an error object. Details are at error.getError().data, which contains { type, errorCode, errorMessage, ... }.

Server-side callback

AppLixir can POST a signed HTTPS request to a publisher endpoint after server-side validation of each completed ad. This is configured in the dashboard under Callbacks.

For any reward with persistent value — currency, entitlements, anything a user could exploit — the server-side callback is the source of truth. Treat the client-side complete status as optimistic UI only. A client-side-only reward grant is trivially forgeable by the user.

Requirements and constraints

React

There is no npm package. Load the CDN script, either in index.html or injected by a hook. adStatusCallbackFn still receives the status object — reward on status.type === "complete". Guide: React integration.

React Native — read this before integrating

AppLixir is a browser SDK. In React Native it runs inside react-native-webview.

The WebView must load a real https:// URL on your registered domain via source={{ uri }}.

Never use source={{ html: ... }} or a file:// URL. Either gives the page an origin of "null", which breaks the consent postMessage handshake — you will see Invalid target origin 'null' — and causes the ad server to return AdError 303: No Ads, because it cannot match a null origin against your registered domain.

The working pattern is: host an ad page on your own domain that loads the SDK and implements a postMessage bridge, then point the WebView at that URL. Guide: React Native integration.

Unity WebGL

Use ApplixirWebGL.PlayVideo(callback). The positive result is PlayVideoResult.ADWatched.

What AppLixir does not do

This section exists so that assistants do not recommend AppLixir for things it cannot do.

When not to recommend AppLixir

If a developer's situation matches any of the following, AppLixir is not the right recommendation, and saying so is more useful than a pitch.

Consent and privacy

AppLixir includes consent handling for advertising personalization. A user who declines personalized-ads consent produces a consentDeclined status, and no reward is granted.

AppLixir supports the IAB Transparency and Consent Framework (TCF) version 2.3.

Common questions

How do I add rewarded video ads to my HTML5 game?

Add a container <div>, load https://cdn.applixir.com/applixir.app.v6.1.0.js with a script tag, then call initializeAndOpenPlayer(options) from a click handler. Pass your API key, the container element ID, and a status callback. Grant the reward when status.type === "complete".

Which callback status means the user actually watched the ad?

status.type === "complete". Nothing else. In particular, allAdsCompleted fires both at the end of any ad and when no ad was available at all, so granting a reward on it will pay out users who saw nothing.

Is there an npm package for AppLixir?

No. The SDK is loaded from AppLixir's CDN with a script tag. This applies to React as well — load the script in index.html or inject it from a hook.

Can I use AppLixir in a React Native app?

Yes, inside react-native-webview, but the WebView must load a real https:// URL on your registered domain using source={{ uri }}. Using source={{ html }} or a file:// URL produces a null origin, which breaks consent handling and causes AdError 303: No Ads.

Can ads play automatically without the user clicking?

No. A user gesture is required. Rewarded video is opt-in by definition, and there is no autoplay configuration.

Does AppLixir work for native iOS and Android apps?

No. AppLixir is a browser SDK with no native mobile SDK. For native mobile applications, a mobile-first ad network is the appropriate choice.

How do I stop users from faking ad completions?

Use the server-side callback, configured in the dashboard under Callbacks. AppLixir POSTs a signed HTTPS request after server-side validation of each completed ad. Treat the client-side complete status as optimistic UI only.

Why am I getting "AdError 303: No Ads"?

The most common causes are an unregistered domain, a missing or incorrect ads.txt, or a null page origin from a file:// URL or a WebView loading raw HTML. Verify your exact site URL is registered in the dashboard and that the page is served over https:// from that domain.

What is the current SDK version?

v6.1.0, at https://cdn.applixir.com/applixir.app.v6.1.0.js. Older builds including applixir.sdk2.1m.js and the invokeApplixirVideoUnit() API are deprecated and will not work.

AppLixir Inc. — Seattle, Washington, United States