Example lobby
This is our demo library, 0 games, exactly as a sandbox key returns it. Switch the style and the format: a brand picks one style, and every game in its lobby follows it. Your own lobby works the same way with a live key. Read the docs.
The demo library isn't available right now.
The code behind a lobby like this
One request from your server, then plain image tags. Fetch the list once a day: image links last about a week.
Node.js
// server.js: the whole lobby, from one API call (Node 18+, Express)
import express from "express";
const app = express();
app.get("/", async (_req, res) => {
const r = await fetch("https://api.casinothumbnails.com/v1/games?format=3x4&width=500", {
headers: { Authorization: `Bearer ${process.env.CT_KEY}` }, // a sandbox key shows this demo library
});
const { data } = await r.json();
res.send(`<div class="lobby">${data.map((g) => `
<a href="/play/${g.ref ?? g.id}">
<img src="${g.images["3x4"]["500"]}" alt="${g.title}" width="375" height="500" loading="lazy">
</a>`).join("")}</div>`);
});
app.listen(3000);