Skip to contentGo to cookie choices
Skip to docs navigation

SDK playground

https://docs.zokogames.com/sdk/playground

Purpose: try every kind of SDK call without writing a game, and see exactly what comes back.

The playground runs the real ZokoGames SDK on this page in local mode. It answers from the in-page mock, so ads are a three-second overlay, banners are dashed boxes, users and friends are fake and cloud save lives in your browser. Press a button to run a call, read its code, and see the result or error object in the log.

Use it to learn the shapes of the calls and errors. It does not show the portal's real behaviour (real ad failures, per-game ad and banner settings, guests on the live portal); for that load your own game in the Preview tool.

Note

The page adds useLocalSdk=true to its address so the SDK allows local mode on this host. The scenario selectors below reload the page with the matching query switch.

What it can and cannot show:

Situation In the playground
Local mode Always. The environment is "local".
Guest Set the scenario switch user_response to logged_out, then press the sign-in call.
Token and sign-in outcomes Scenario switches token_response and show_auth_prompt_response (see local testing).
Ad blocked There is no switch here. Add ad_response=adblock to the page address by hand; hasAdblock() then returns true.
Calls covered Ads, banners, game, user, data, analytics and a group of calls that fail on purpose. The store, achievements, rooms (game.room), offline state and leaderboards are not in the list; use your own game in the Preview tool or local mode.
Offline, ad-free, real checkout Not simulated here; use the Preview tool.

Try it#

Next steps#

SDK playground

Loading the SDK

Scenario switches

Changing a switch reloads the page, because the SDK reads these values once at start.

Ads

Banners

Game

User

Data (cloud save)

Error cases

Banner container

pg-banner

Event log

Press a call to see its result here.

Something unclear, wrong or missing on this page? Tell us through support · Test your game in the preview tool