Quickstart
This guide takes you from an empty account to a game playing on your own page. You need access to the dashboard and a backend that can make an HTTPS request.
-
Create a channel.
In the dashboard, open Channels and choose New channel. Name it after the place it will appear, for example “Homepage promo”. A channel is the spot on your site where games show. You embed it once and change campaigns inside it as often as you like.
-
Create a campaign in it.
Inside the channel, create a campaign. Pick a game, give it a name, then set it up on the Config tab. The preview on the right shows what players will see. When you are happy, choose Activate. See Campaigns for scheduling and the other tabs.
-
Allow your page to show games.
Open Settings, then Allowed origins, and add the address of the site that will embed the game, for example
https://www.example.com. Tokens are only issued for addresses on this list. -
Create an API key.
In Settings, then API keys, create a key with the Issue player tokens permission. Copy it now: it is shown once. Keep it on your server, never in a web page or an app.
-
Ask for a client token from your backend.
When a signed-in user opens the page, your backend asks Keliplay for a client token for that user.
participantRefis your own id for the user, so you can match plays and prizes back to them later.Terminal window curl -X POST https://api.keliplay.com/v1/auth/session-tokens \-H "Authorization: Bearer $KELIPLAY_API_KEY" \-H "Content-Type: application/json" \-d '{"channelId": "3f6b1c0a-8e2d-4b7a-9c15-2d4e6f8a0b1c","participantRef": "user_8412","origin": "https://www.example.com"}'{"clientToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...","expiresAt": "2026-10-05T10:15:00.000Z","jti": "6e3c1d0b-2f4a-4c55-9a1e-3b7d9f0c2a11"}Pass the
clientTokento the page. If nothing is live on the channel right now,clientTokenisnull: pass that through too, and the frame shows your between-campaigns message. -
Paste the embed snippet.
Copy the snippet from the channel’s Embed tab. It already contains your channel id. Put the token in place of
YOUR_CLIENT_TOKEN.<div id="keliplay-game"></div><script src="https://play.keliplay.com/sdk/loader.js"></script><script>KrdsGames.mount('#keliplay-game', {channelId: '3f6b1c0a-8e2d-4b7a-9c15-2d4e6f8a0b1c',clientToken: 'YOUR_CLIENT_TOKEN',playBaseUrl: 'https://play.keliplay.com',})</script> -
Play it.
Open your page and play. The play appears in the campaign’s Results tab. To try a campaign without counting towards results, use Test play in the dashboard instead.
Next steps
Section titled “Next steps”- Hear about plays and winners on your backend with webhooks.
- Using React? See React.
- React to what happens inside the game, such as a finished play, with game events.
- Hand out coupons when players qualify: Rewards and coupons.