Hybrid Integration
When to Use Hybrid Integration
Architecture
Player's Browser Your Game Server Play.fun API
┌─────────────────┐ ┌───────────────────┐ ┌───────────────┐
│ Client SDK │ │ Server SDK │ │ │
│ │ │ │ │ │
│ 1. Login & │ │ │ │ │
│ get session ├─────────►│ 3. Validate │ │ │
│ token │ send │ session token ├───────►│ Verify token │
│ │ token │ │ │ │
│ 2. Submit game │ │ 4. Run game │ │ │
│ state + │ │ logic & │ │ │
│ session │ │ validate │ │ │
│ token to │ │ │ │ │
│ server │ │ 5. Save points ├───────►│ Store points │
│ │ │ via server SDK│ │ │
│ │◄─────────┤ │ │ │
│ 6. Sync widget │ respond │ 6. Return result │ │ │
│ via refresh │ │ to client │ │ │
│ PointsAnd │ │ │ │ │
│ Multiplier │ │ │ │ │
└─────────────────┘ └───────────────────┘ └───────────────┘Step-by-Step Guide
1. Client SDK Setup
2. Read the Session Token and Player ID
Property
Type
Description
3. Validate the Token on Your Server
4. Run Game Logic and Save Points
5. Sync the Widget on the Client
Complete Example
Client-Side (JavaScript)
Server-Side (Node.js / Express)
Security Notes
Last updated