Para operadores

Integração rápida

Copie o embed em iframe e gere o token de produção para os subdomínios oficiais treasure-dive.i-gaming.co e caramelo-jackspot.i-gaming.co.

1. Gerar token

No painel /operator → Tokens, gere um token com allowed_domains = subdomínio do jogo.

2. Copiar embed

Cole o snippet de iframe no HTML do subdomínio e substitua {{TOKEN}}.

3. Validar

Teste com ?demo=1, confira eventos postMessage e ative produção.

C
treasure-dive.i-gaming.co

Mergulho ao Tesouro

Crash · slug mergulho-ao-tesouro
Embed em iframe (cole no HTML do subdomínio)html
<!-- treasure-dive.i-gaming.co -->
<!doctype html>
<html lang="pt-BR">
  <head>
    <meta charset="utf-8" />
    <title>Mergulho ao Tesouro</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <style>
      html,body{margin:0;height:100%;background:#0a0a0a}
      .frame{position:fixed;inset:0;border:0;width:100%;height:100%}
    </style>
  </head>
  <body>
    <iframe
      class="frame"
      src="https://i-gaming.co/games/mergulho-ao-tesouro?token={{TOKEN}}&lang=pt-BR&currency=BRL"
      allow="autoplay; fullscreen"
      referrerpolicy="strict-origin-when-cross-origin"
    ></iframe>
    <script>
      window.addEventListener("message", (e) => {
        if (e.origin !== "https://i-gaming.co") return;
        const { type, payload } = e.data || {};
        if (type === "igaming:ready")       console.log("Jogo pronto", payload);
        if (type === "igaming:bet.placed")  console.log("Aposta", payload);
        if (type === "igaming:bet.lost")    console.log("Derrota", payload);
        if (type === "igaming:error")       console.error("Erro", payload);
      });
    </script>
  </body>
</html>
Gerar token de produção (cURL)bash
curl -X POST https://i-gaming.co/api/public/v1/tokens/request \
  -H "Authorization: Bearer $OPERATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "production",
    "scope": "game:mergulho-ao-tesouro",
    "allowed_domains": ["treasure-dive.i-gaming.co"],
    "expires_in_seconds": 86400,
    "rotate_previous": true
  }'
Gerar token de produção (Node.js)ts
// Node 20+ (fetch nativo)
const res = await fetch("https://i-gaming.co/api/public/v1/tokens/request", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPERATOR_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    environment: "production",
    scope: "game:mergulho-ao-tesouro",
    allowed_domains: ["treasure-dive.i-gaming.co"],
    expires_in_seconds: 86_400,
    rotate_previous: true,
  }),
});
const { token, expires_at, token_id } = await res.json();
Token demo para validaçãobash
# Token demo (não consome saldo real)
curl -X POST https://i-gaming.co/api/public/v1/tokens/request \
  -H "Authorization: Bearer $OPERATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "demo",
    "scope": "game:mergulho-ao-tesouro",
    "allowed_domains": ["treasure-dive.i-gaming.co"],
    "expires_in_seconds": 3600
  }'
Pré-flight: GET /api/public/v1/game-config?slug=mergulho-ao-tesouro retorna RTP efetivo, min_bet, max_bet e max_payout aplicáveis a este operador.
S
caramelo-jackspot.i-gaming.co

Caramelo da Sorte

Slot · slug caramelo-da-sorte
Embed em iframe (cole no HTML do subdomínio)html
<!-- caramelo-jackspot.i-gaming.co -->
<!doctype html>
<html lang="pt-BR">
  <head>
    <meta charset="utf-8" />
    <title>Caramelo da Sorte</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <style>
      html,body{margin:0;height:100%;background:#0a0a0a}
      .frame{position:fixed;inset:0;border:0;width:100%;height:100%}
    </style>
  </head>
  <body>
    <iframe
      class="frame"
      src="https://i-gaming.co/games/caramelo-da-sorte?token={{TOKEN}}&lang=pt-BR&currency=BRL"
      allow="autoplay; fullscreen"
      referrerpolicy="strict-origin-when-cross-origin"
    ></iframe>
    <script>
      window.addEventListener("message", (e) => {
        if (e.origin !== "https://i-gaming.co") return;
        const { type, payload } = e.data || {};
        if (type === "igaming:ready")       console.log("Jogo pronto", payload);
        if (type === "igaming:bet.placed")  console.log("Aposta", payload);
        if (type === "igaming:bet.lost")    console.log("Derrota", payload);
        if (type === "igaming:error")       console.error("Erro", payload);
      });
    </script>
  </body>
</html>
Gerar token de produção (cURL)bash
curl -X POST https://i-gaming.co/api/public/v1/tokens/request \
  -H "Authorization: Bearer $OPERATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "production",
    "scope": "game:caramelo-da-sorte",
    "allowed_domains": ["caramelo-jackspot.i-gaming.co"],
    "expires_in_seconds": 86400,
    "rotate_previous": true
  }'
Gerar token de produção (Node.js)ts
// Node 20+ (fetch nativo)
const res = await fetch("https://i-gaming.co/api/public/v1/tokens/request", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.OPERATOR_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    environment: "production",
    scope: "game:caramelo-da-sorte",
    allowed_domains: ["caramelo-jackspot.i-gaming.co"],
    expires_in_seconds: 86_400,
    rotate_previous: true,
  }),
});
const { token, expires_at, token_id } = await res.json();
Token demo para validaçãobash
# Token demo (não consome saldo real)
curl -X POST https://i-gaming.co/api/public/v1/tokens/request \
  -H "Authorization: Bearer $OPERATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "environment": "demo",
    "scope": "game:caramelo-da-sorte",
    "allowed_domains": ["caramelo-jackspot.i-gaming.co"],
    "expires_in_seconds": 3600
  }'
Pré-flight: GET /api/public/v1/game-config?slug=caramelo-da-sorte retorna RTP efetivo, min_bet, max_bet e max_payout aplicáveis a este operador.

Checklist de go-live

  • Token criado com allowed_domains exato do subdomínio
  • Pré-flight game-config retornou status 200 e RTP esperado
  • Iframe carrega com referrerpolicy strict-origin-when-cross-origin
  • Evento igaming:ready recebido no postMessage
  • Teste com ?demo=1 concluído sem erros
  • Produção ativada removendo demo=1 e incluindo user_id
  • Rotação de token agendada antes de expires_at
  • Logs de auditoria revisados em /operator → Tokens