SDK changelog
The SDK follows SemVer: /_ip/sdk/v1.js is the latest release of major 1 (backward compatible fixes
arrive automatically), /_ip/sdk/v1.<minor>.<patch>.js is a pinned version. The bridge protocol
(ip) is versioned separately; the portal supports the current and the previous one.
1.4.0 — November 2026
Sign-in from the game. The ip: 1 protocol does not change — games on 1.0–1.3 keep working; the pinned
/_ip/sdk/v1.0.0.js, v1.1.0.js, v1.2.0.js and v1.3.0.js stay available, and /_ip/sdk/v1.js is
now 1.4.0.
InstaPlay.player.login()— the portal sign-in window over the game (the counterpart of CrazyGamesuser.showAuthPrompt()): Google, VK ID, Yandex ID (if configured on the portal) and email with a one-time code. OutcomeLoginResult:signed_in(withplayer),already_signed_in(withplayer, no window),cancelled.- The first sign-in upgrades the guest to an account in place: the same
player.id, pseudonym and saves, the game goes on without a restart; thegetToken()cache is dropped, the next token haskind: account. A sign-in to an existing account gives a differentplayer.id: thenplayerChanging { reason: 'login' }and a restart in about 1.5 s. - Only on a player gesture (click, tap, key) — otherwise the new
gesture_requirederror code; at most 3 times a minute (rate_limited); one window at a time — a repeated call returns the same promise; the window closes after 15 minutes (cancelled), the call timeout is 16 minutes. While the window is open —pausewith theoverlayreason, thenresume. - Errors:
not_supported(outside the portal, preview),unavailable(no sign-in methods or the API is unavailable),gesture_required,rate_limited,not_initialized,timeout. - The
logincapability —isSupported('login'); the reserved nameauthorizeis now its alias (it used to be alwaysfalse). - The
instaplay devemulator: a “Sign-in from the game” window with “Sign in as a test player” and “Cancel” buttons. - Reference — Player, the guide with examples and the CrazyGames SDK mapping — Player and sign-in. Engine wrappers for Unity, Godot and Construct 3 — 1.3.0 (sign-in).
1.3.0 — November 2026
Ads. The ip: 1 protocol does not change — games on 1.0–1.2 keep working; the pinned
/_ip/sdk/v1.2.0.js stays available.
InstaPlay.ads.interstitial({ placement, moment })— a full-screen ad in a natural break (between levels); result{ shown, reason }. Duringgameplay—reason: 'gameplay_active'.InstaPlay.ads.rewarded({ placement })— a rewarded ad: the portal asks the player itself (“Watch an ad for a reward?”), the reward comes only after the ad is watched; result{ rewarded, reason, grant },grant.tokenis a signedip-reward+jwtJWT (aud: reward:<game id>) for your server.InstaPlay.ads.available(type)— whether an ad can be shown now (portal frequency limits).- Regular outcomes (no ad, cooldown, the player declined) do not reject the promise; outside the portal —
reason: 'disabled'. While the ad is shown the game getspause { reason: 'ad' }andmute; sound turned off by the player stays off. Capability —isSupported('ads'). - Reference — Ads, the guide with reward verification on your server — Ads in your game. Engine wrappers for Unity, Godot and Construct 3 — 1.2.0 (ads).
1.2.0 — November 2026
The ip: 1 protocol does not change — games on 1.0 and 1.1 keep working; the pinned
/_ip/sdk/v1.1.0.js stays available.
init()returnscountry— the player country (ISO 3166-1 alpha-2) ornull. The field already existed in the bridge protocol; currently the portal does not pass the country (null), and outside the portal it is alwaysnull. How to pick a server region — Game network.playerChanging: a guest replaced by another guest is nowswitch(waslogout);logoutis only a sign-out from an account. The reasons are the same on the portal and in the emulator (there “Player A → Player B” isswitch).
1.1.0 — November 2026
Games with their own server (the ip: 1 protocol does not change — games on 1.0 keep working):
InstaPlay.player.getToken()— a player token signed by the portal (JWT ES256, 10 minutes) for your own server; cached until a minute before expiry; thetokenfeature (isSupported('token')).init()returnssession:ok— a real player,none— no session (playeris thep_gueststub),local— outside the portal. Withoutokdo not useplayer.idas a key.- Initial sound and pause:
InstaPlay.system.mutedandInstaPlay.system.pause— frominit, then by themute/unmute,pause/resumeevents. - The
playerChanging { reason: 'login' | 'logout' | 'switch' }event about 1.5 s before the game restarts when the player signs in or out in another tab (a guest who became an account — alsologin). - The
Featuretype knowstoken,ads,shop,authorize(the last three arefalseuntil the purchases and ads phase). - Analytics: a batch not accepted because of the network, a timeout, a limit or unavailability goes back to the buffer (retry 1 → 60 s, the buffer keeps the last 200 events); it is dropped only on a data error.
- Lifecycle notifications limit — 120 per minute; a repeated
gameplay.start/gameplay.stopof the same state does not spend it. - The frame URL parameters
instaplay_originandinstaplay_localeare a stable contract.
Saves and more:
- Two tabs of one browser: the version a key is written from comes from the memory of this page
load (what it last received from the server), not from the buffer shared by tabs. A stale tab
loses to the cloud:
set→version_conflict, its local version goes to__ip:orphan:<key>, the key "must be read". Between devices — as before. - A pause of any reason (portal window, sign-in, an ad) sends the save buffer immediately — like a hidden tab.
- Player:
kind: 'account'for a signed-in player, the nickname they chose andavatar— an image path on the game origin. Signing in or out in another tab restarts the game. - Saves: a local version never checked against the server (no
get, after a failedget, without a session) no longer overwrites the cloud on conflict — the server wins,setrejects withversion_conflict, the local one goes to__ip:orphan:<key>. A checked one still wins. saves.getwithout a server answer and without a local copy rejects (unavailable/offline) instead of returningnull.- The save buffer is bound to the player: if the guest changes in the same browser (cookies cleared
or blocked, a shared computer), the other player's buffer is neither sent nor returned to the
game — it goes to
__ip:orphan:<key>, and the previous player's cloud is left untouched. - Strings with
\u0000and lone surrogates —invalid_payloadat once; data errors are not retried; at most 20 timer retries per page load (thenonline, hiding the tab,flush, the nextinit). - An exception in
onConflictfalls back to the default behaviour instead of a hanging write. - Analytics: property keys are
^[A-Za-z_][A-Za-z0-9_]{0,39}$, as on the server;leveloflevel.*is not lost with 10 properties. - Local mode: leaderboard
periodStartis aYYYY-MM-DDdate, as on the portal. - Saves (re-review): "the local version wins" and
forceapply only when the server confirmed the version the write grew from during this page load. A copy from a previous load or another tab never destroys the cloud: if the cloud has not changed, the write succeeds; if it has, the cloud wins. - New field
SaveEntry.confirmed:true— the server answered during this load,false— a copy from the device (the cloud did not answer). Alwaystrueinlocal/disabledmodes. - After losing on send, the key "must be read":
setbefore agetof that key rejects withversion_conflict. - Only data errors are not retried (
invalid_payload,payload_too_large,quota_exceeded,message_too_large);internal_errorand unknown codes are retried. - Without a session
remove/clearreject withunavailableand touch nothing;__ip:orphan:<key>lives for 30 days and is removed first when storage is full.
1.0.0 — November 2026
- The script from the game origin:
/_ip/sdk/v1.js(+v1.d.tstypes), npm@instaplay/sdk(preview). init,loading.progress,ready,gameplay.start/stop,game.happyMoment,level.*.player.get— a guest with a player×studio pseudonym.saves.*— cloud saves with versions, an offline buffer and conflicts.leaderboard.submit/get— day/week/all-time periods (MSK), player rank.analytics.event/flush— batched events.- Portal events:
pause,resume,mute,unmute,visibility,localeChanged. - Bridge protocol
ip: 1.