GameTok games

Docs

Your game stays as it is — no SDK, no GameTok code. Host it yourself or upload it to GameTok, and GameTok shows it in its feed, in a frame, at gametok.co/game/<id>.

How it fits together

Any web game works (HTML5, Canvas, Phaser, Three.js, Unity WebGL, Godot…). Updates are instant: GameTok loads your hosted URL, so every time you deploy, players get the new version.

Quick start

  1. Sign in and open Get started — one short form: your username (first time), the game, how it's played, category, and the Developer Agreement.
  2. Allow GameTok to frame your page (see below) and deploy.
  3. Try it: the form saves a private draft and opens it in the test player.
  4. Go live: click Go live in the test player or on the game's page. If the automatic checks pass, it's in the feed at gametok.co/game/<id>.

Allow GameTok to show your game

GameTok shows your game inside a frame on https://gametok.co (and the test player on https://games.gametok.co). Your page must not send X-Frame-Options: DENY or SAMEORIGIN. If you send a Content-Security-Policy, include:

Content-Security-Policy: frame-ancestors 'self' https://gametok.co https://games.gametok.co

Examples

HostWhere
Vercelvercel.json → "headers": [{ "source": "/(.*)", "headers": [{ "key": "Content-Security-Policy", "value": "frame-ancestors 'self' https://gametok.co https://games.gametok.co" }] }]
Netlify / Cloudflare Pages_headers file: /* then   Content-Security-Policy: frame-ancestors 'self' https://gametok.co https://games.gametok.co
GitHub PagesNothing to do — it doesn't block framing.
itch.ioPublish the game file URL (html-classic.itch.zone/…), not the store page: right-click the game → Open frame in new tab.

Players' browsers block http:// pages inside GameTok, so your game must be served over https://.

Publishing

Three ways, all ending in the same automatic checks:

Publishing again with the same title updates your game. Re-check a live game any time from its Checks tab.

Test mode

Drafts are private: they aren't in the feed, search or your public profile, and their GameTok page isn't public. You play them in the test player (games.gametok.co/sandbox/?game=<id>) — the real GameTok player, before anyone else sees the game.

Make drafts with a test key (gtk_test_…) — anything it publishes is a draft and it can never change a live game — or with the dashboard's Save as a draft. When it works, click Go live.

TestLive
API keygtk_test_…gtk_live_…
Publishing createsa private drafta live game (if checks pass)
Where it playsthe test playerthe GameTok feed and app

Automatic checks

Every publish and Go live runs these. There's no manual review queue: the game goes live when every required check passes. You are still responsible for following the Developer Agreement.

CheckRequiredFails when
Served over HTTPSyesthe URL, or where it redirects, is http://
Game URL loadsyesit returns an HTTP error (404, 500…)
Can be shown inside GameTokyesX-Frame-Options or frame-ancestors blocks gametok.co
Is a web pageyesthe URL returns something other than HTML (e.g. a .zip)
Mobile viewport meta tagrecommendedno <meta name="viewport">

If GameTok can't reach your URL at all (timeout, your host blocks bots), the game still publishes with a warning — open the GameTok link to make sure it plays.

Server API reference

Base URL https://gametok-backend-267787411422.us-central1.run.app/api. Authenticate with Authorization: Bearer <API key>. Keep keys on your server.

EndpointWhat it does
POST/publishPublish (or update) a game. Body: url or html, title, description, orientation (portrait|landscape; leave it out and GameTok detects it from the game), category, draft. Returns gameId, url, status, checks, and testUrl for drafts.
GET/developer/gamesYour games with plays, unique players, checks and integration status.
POST/developer/games/:id/verifyRe-run the automatic checks.
POST/developer/games/:id/submitGo live (live key or dashboard). Runs the checks.
GET/developer/games/:id/analyticsPlays, unique players, average session, high score.
DELETE/developer/games/:idUnpublish and delete a game (test keys: drafts only).

API keys

Create keys in Dashboard → Settings → API Keys. Each key is shown once; GameTok stores only a hash of the key. Revoke a key there at any time — it stops working immediately. Keys can't accept the Developer Agreement or create other keys; that needs you, signed in.

Error codes

CodeMeaning
AGREEMENT_REQUIREDAccept the current Developer Agreement in the dashboard.
GAME_URL_NOT_HTTPS · GAME_URL_UNREACHABLE · GAME_NOT_EMBEDDABLE · GAME_URL_NOT_HTML · GAME_HTML_INVALIDAn automatic check failed; error says how to fix it.
TEST_KEY_CANNOT_GO_LIVE · TEST_KEY_LIVE_GAMETest keys only work on drafts.

Sample game

Tap Tap is a complete small game — view its source, copy it, and publish it as a draft to see the test player in action.

Using an AI agent

Prefer to let an agent do it? Give Claude Code, Cursor or another coding agent this prompt from your game's folder. It follows skill.md and asks you for your API key.

Read https://games.gametok.co/skill.md and publish this game to GameTok. Ask me for my GameTok API key (games.gametok.co/dashboard → Settings → API Keys) before publishing.

Questions or problems: info@gametok.com