Game launch
To open a game, create a launch token for the signed-in player and load the game's URL in an iframe on your site.
URL structure
https://{launch-host}{path}?operator={operator}&token={token}¤cy={currency}&lang={lang}&return_url={return_url}{launch-host} and {path} depend on the game: see Games. For AvioniX's crash game, for example: https://avionix-v3-web.vaslogic.com/embed?operator=yourcasino&token=….
Parameters
| Parameter | Type | Description |
|---|---|---|
operatorrequired | string | Your operator name, given to you at onboarding (e.g. yourcasino). |
tokenrequired | string | A launch token you create for this player and session (up to 512 characters; use at least 32 random characters). The game sends it to your /auth and then as session_token on every call. Leave it out to open the game as a guest. |
currencyoptional | string | The player's currency code, e.g. KES. It must be the currency agreed for your integration. |
langoptional | string | Interface language, e.g. EN. The games are in English today; send it anyway and other languages switch on without changing your links. |
return_urloptional | string | Where Log in and the casino link take the player (your lobby or login page). URL-encode it. |
Launch tokens
- Create a new token each time a player opens a game: at least 32 random characters, at most 512.
- Keep it valid for as long as the player's session on your site. We call your
/authagain with the same token whenever the player reloads the game or their connection comes back. - It also travels as
session_tokenon every/info,/withdrawand/deposit. Payouts can arrive after it expires: accept them anyway (see Deposit).
Building the link
import crypto from "node:crypto";
// When a signed-in player opens AvioniX: a fresh launch token, valid as long as their session.
app.get("/play/avionix", requireLogin, async (req, res) => {
const token = crypto.randomBytes(24).toString("hex");
await db.query(
"INSERT INTO game_launches (token, player_id, expires_at) VALUES ($1, $2, now() + interval '12 hours')",
[token, req.user.id],
);
const url = new URL("https://avionix-v3-web.vaslogic.com/embed"); // AvioniX's launch host
url.search = new URLSearchParams({
operator: "yourcasino", token, currency: "KES", lang: "EN",
return_url: "https://yourcasino.com/casino",
}).toString();
res.render("game", { gameUrl: url.toString() }); // <iframe src="{{gameUrl}}">
});Embedding the game
The game is a full-screen web app: give it the whole screen on phones and a tall frame on desktop. It plays sounds after the player's first tap.
<div class="game-frame">
<iframe
src="https://avionix-v3-web.vaslogic.com/embed?operator=yourcasino&token=8f3c1d2e9b7a4c5d8e1f2a3b4c5d6e7f¤cy=KES&lang=EN&return_url=https%3A%2F%2Fyourcasino.com%2Fcasino"
title="AvioniX"
allow="autoplay; fullscreen; clipboard-write"
allowfullscreen
></iframe>
</div>
<style>
/* Full screen on phones, a tall frame on desktop. */
.game-frame { position: fixed; inset: 0; }
.game-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (min-width: 1024px) {
.game-frame { position: relative; inset: auto; height: calc(100vh - 80px); }
}
</style>Guest mode
Open the URL without a token and the game runs for a visitor who isn't signed in: live rounds, bets and chat to watch, the rules and fairness pages to read. Its Log in button takes them to your return_url.