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
- Sign in and open Get started — one short form: your username (first time), the game, how it's played, category, and the Developer Agreement.
- Allow GameTok to frame your page (see below) and deploy.
- Try it: the form saves a private draft and opens it in the test player.
- 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
| Host | Where |
|---|---|
| Vercel | vercel.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 Pages | Nothing to do — it doesn't block framing. |
| itch.io | Publish 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:
- Get started / Dashboard: Get started or + New Game → your hosted URL, or upload your build folder (any size), a
.zipof it, or a single self-containedindex.html. Keep asset paths relative (./assets/…) so they load from GameTok's hosting. - API:
POST /api/publishwith an API key (see reference). - AI agent: give Claude Code, Cursor or similar the prompt on the home page; it follows skill.md.
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.
| Test | Live | |
|---|---|---|
| API key | gtk_test_… | gtk_live_… |
| Publishing creates | a private draft | a live game (if checks pass) |
| Where it plays | the test player | the 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.
| Check | Required | Fails when |
|---|---|---|
| Served over HTTPS | yes | the URL, or where it redirects, is http:// |
| Game URL loads | yes | it returns an HTTP error (404, 500…) |
| Can be shown inside GameTok | yes | X-Frame-Options or frame-ancestors blocks gametok.co |
| Is a web page | yes | the URL returns something other than HTML (e.g. a .zip) |
| Mobile viewport meta tag | recommended | no <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.
| Endpoint | What it does |
|---|---|
POST/publish | Publish (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/games | Your games with plays, unique players, checks and integration status. |
POST/developer/games/:id/verify | Re-run the automatic checks. |
POST/developer/games/:id/submit | Go live (live key or dashboard). Runs the checks. |
GET/developer/games/:id/analytics | Plays, unique players, average session, high score. |
DELETE/developer/games/:id | Unpublish 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
| Code | Meaning |
|---|---|
AGREEMENT_REQUIRED | Accept the current Developer Agreement in the dashboard. |
GAME_URL_NOT_HTTPS · GAME_URL_UNREACHABLE · GAME_NOT_EMBEDDABLE · GAME_URL_NOT_HTML · GAME_HTML_INVALID | An automatic check failed; error says how to fix it. |
TEST_KEY_CANNOT_GO_LIVE · TEST_KEY_LIVE_GAME | Test 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