Documentação · API v1

Integre em minutes

Embeda nossos jogos no seu site com uma única tag <iframe>. Sem SDK, sem build, sem dor de cabeça.

Integration wizard

~3 min

Validate your domain, generate a demo token and confirm the iframe — all here, without leaving the page.

1Domínio
2Token
3Validação
4Iframe

Without https://. Ex: meusite.com, app.meusite.com ou localhost.

Quick start (60 segundos)

Paste this tag in your HTML. Done — the game loads.

html
<iframe
  src="https://i-gaming.co/games/gold-tiger-slot?token=SEU_TOKEN&player=ID_DO_JOGADOR&lang=pt&currency=BRL"
  width="100%"
  height="720"
  allow="autoplay; fullscreen"
  style="border:0; border-radius:12px;"
></iframe>
1
Receive your token
Te enviamos um token de demo em segundos.
2
Paste the iframe
Uma tag, zero dependências.
3
Go live
Funciona em desktop, tablet e mobile.

Step by step

1

Request your integration token

Talk to the team using the form at /operators or use the token demo to test now.

You will receive a token in the format mt_xxxxxxxxxxxx com permissões e domínios autorizados (whitelist).

2

Register authorized domains

Informe os domínios onde o iframe vai rodar (ex: meusite.com). Apenas esses domínios poderão embedar — protege contra clonagem.

json
{
  "name": "Site Principal",
  "allowed_domains": ["meusite.com", "staging.meusite.com"]
}
3

Valide o token (opcional, recomendado)

Before rendering, confirm if the token is active and which domains are allowed:

bash
curl https://i-gaming.co/api/public/v1/auth/introspect \
  -H "X-Operator-Token: SEU_TOKEN"

Use X-Operator-Token as a standard header. Authorization: Bearer e x-api-key are also accepted, but some CDNs/proxies remove the header Authorization em rotas públicas.

4

Embed the iframe

Point the src to the desired game by passing the token and player parameters.

html
<iframe src="https://i-gaming.co/games/mergulho-ao-tesouro?token=SEU_TOKEN&player=USER123&currency=BRL"
  width="100%" height="720" allow="autoplay; fullscreen" style="border:0"></iframe>
5

Follow via the panel

In /operator you see spins, bets, liquidity and security logs in real-time.

API Endpoints

Base URL: https://i-gaming.co/api/public/v1. Authentication via header X-Operator-Token: <token> (recomendado). Também aceitamos x-api-key e Authorization: Bearer <token> — este último pode ser filtrado por CDNs/proxies em algumas redes.

GET/auth/verify
GET/auth/introspect
GET/operator
GET/stats?days=30
GET/round/current
GET/tokens
POST/tokens
DELETE/tokens?id=

Example:

bash
curl https://i-gaming.co/api/public/v1/stats?days=7 \
  -H "X-Operator-Token: SEU_TOKEN"

Iframe parameters

URL: https://i-gaming.co/games/<slug>?...

ParamRequiredDescription
tokensimToken Bearer do operador.
playersimID único do jogador no seu sistema.
currencynoBRL · USD · EUR (default: BRL)
langnopt · en · es (default: pt)
modenoreal · demo (default: real)
return_urlnoURL de retorno ao fechar o jogo.

Available games:

Gold Tiger · Slot
/games/gold-tiger-slot
Money Money · Slot
/games/money-money
Mega Blocks · Slot
/games/mega-blocs
Tower Treasure · Slot
/games/tower-treasure
Bingo Royale · Slot
/games/brasil-bingo
Tropical Slice · Slot
/games/fruta-explosiva
Boom Mines · Slot
/games/boom-mines
Motoca do Grau · Crash
/games/corrida-de-moto
Piratas Mines · Slot
/games/piratas-mines
Mergulho ao Tesouro · Crash
/games/mergulho-ao-tesouro
India Rush · Crash
/games/india-rush
Deuses da Terra · Slot
/games/deuses-da-terra
Dragão Imperial · Slot
/games/dragao-imperial
Faraó Dourado · Slot
/games/farao-dourado
Los Muertos · Slot
/games/los-muertos
Tropical Slot · Slot
/games/tropical-slot
Favela Slot · Slot
/games/favela-slot
Caramelo da Sorte · Slot
/games/caramelo-da-sorte
Capivara Milionária · Slot
/games/capivara-milionaria
Boteco da Sorte · Slot
/games/boteco-da-sorte

Security

  • HTTPS + HSTS on all subdomains.
  • CSP frame-ancestors dynamically assembled from your whitelist — only registered domains can embed.
  • Hashed tokens (SHA-256). O segredo é exibido uma única vez na emissão.
  • Audit de cada validação de token e tentativa de render bloqueada (operador, IP, motivo).
  • Immediate revocation via API or panel.

Proxy / CDN — configuração canônica

Todos os ambientes (produção + preview) e todos os 20 jogos devem seguir a mesma ordem de headers e allowlist de proxies para evitar divergência de IP, logs e rate-limit.

IP header order
  1. cf-connecting-ip — Cloudflare
  2. true-client-ip — Akamai / CF Enterprise
  3. x-real-ip — internal nginx
  4. x-forwarded-for — first entry
Trusted proxies
  • Production: Cloudflare only (nuvem laranja)
  • Preview: Lovable edge
  • CDN bypass ⇒ 403 at origin
  • No external proxy without review
Documento completo: docs/PROXY-CDN-CONFIG.md — inclui checklist para novos domínios, monitoramento em Manager → API e alertas automáticos de ip_miss.

Responsible gaming

A plataforma inclui um sistema opcional de automatic responsible gaming warnings, exibido por cima do iframe pelo próprio portal — sem alterar o código dos jogos. Cada operador habilita, desabilita e ajusta os limites em /operator → Config → Responsible Gaming.

Number of sessions / day
Conta quantas vezes o jogador abriu qualquer jogo nas últimas 24h. Padrão: 10.
Continuous time
Minutos ininterruptos jogando na sessão atual. Padrão: 60 min.
Number of rounds
Rodadas contadas desde a abertura do jogo atual. Padrão: 200.

Para cada gatilho o operador escolhe uma action independente:

  • Soft banner — discreet warning overlaid on the game, the player continues normally.
  • Modal with confirmation — blocks until the player clicks on "continue".
  • Mandatory cooldown — pausa o jogo por X minutos (configurável) antes de liberar.
How it works technically
O portal (host do iframe) contabiliza aberturas, tempo e rodadas por jogador e, ao ultrapassar o limite configurado, renderiza um overlay on top do iframe. Vale para os 6 jogos automaticamente, sem exigir alteração no código de cada jogo. Operadores que embedam nosso iframe herdam o mesmo comportamento com as suas próprias regras.

Troubleshooting

Iframe appears blank
Provavelmente o domínio não está na whitelist. Abra o console do navegador — procure por Refused to display ... frame-ancestors. Add the domain in /operator → Tokens.
401 Unauthorized
Token inválido, expirado ou revogado. Use /auth/introspect para confirmar o status.
403 origin_forbidden
A origem da requisição não está em allowed_domains. Cadastre o domínio (sem https://).
I want to test before publishing
Use o Playground — ele simula o embed e detecta erros de CSP em tempo real.
When to switch Authorization: Bearer for X-Operator-Token

Os dois headers autenticam a mesma requisição. Use X-Operator-Token as default — alguns CDNs/proxies/WAFs (Cloudflare em regras corporativas, App Gateway, alguns balanceadores TLS) removem ou reescrevem o header Authorization in public routes, which causes it to fall into 401 missing_bearer mesmo com token válido.

Sinais no painel de alertas (Admin → Segurança → Alertas auth / Tendências auth):

  • missing_bearer_spike active e recent requests with header_type = none coming from your IP → your proxy is stripping the Authorization. Migrate to X-Operator-Token.
  • bearer_stripping_suspected — the reason for the failure is missing_bearer, but the same origin has already sent Authorization: Bearer before successfully. Confirmation of intermediate stripping — change the header.
  • token_invalid_spike com header_type = bearer → the header arrives, o problema é o token (expirado/rotacionado). Não muda para X-Operator-Token — regenerate the token.
  • No active alerts and integration working → keep the header you are already using.

Como validar em 30s: chame /api/public/v1/auth/check with each header and compare — if Authorization returns 401 and X-Operator-Token returns 200, stripping is guaranteed. The endpoint /api/public/v1/health/integration reports the header_type detectado nas últimas requisições.

Next steps