Server-side SDK

When integrating with play.fun, we recommend you use the Server-side SDK for the most secure experience. By using the server SDK, your backend has full authority over point submission — users have no ability to interact with Play Fun directly via your client.

When to Use the Server SDK

  • Your game has a backend that validates gameplay and controls point awarding

  • You want server-to-server communication with the Play Fun API

  • You want to award points conditionally based on server-side logic

  • You need to batch save points for multiple players at once

  • You need a hybrid integration — using the client SDK for auth/UI and the server SDK for point saving (see guide)

When to Use the Client SDK Instead

  • You have a client-only HTML5 game with no backend

  • You want the SDK to handle authentication, UI, and point submission automatically

What the Server SDK Provides

Module
Methods
Description

games

register, update, get, getById, getManyByIds, getAuthedGames, getByTokenId, getByBatchTokenIds

Game management

play

savePoints, batchSavePoints, getPoints, getLeaderboard, validateSessionToken

Points, leaderboard & session validation

users

me, getById

User information

Requirements

Last updated