Overview
Gameball’s Secure Integration Mode is built around two core ideas:- All integration APIs must be called from your backend using your SecretKey.
- All widget/mobile access must be tied to a short-lived, per-customer session token.
1. Integrations v4.1 – What Changed
Previously, some integration endpoints could be called using only the public APIKey. In v4.1 we have standardized security across all integration APIs:-
All endpoints under:
now require:
APIKey: <your-public-api-key>SecretKey: <your-private-secret-key>
- Requests without SecretKey are rejected.
-
Integrations traffic is expected to be server-to-server only:
- No calls from browsers.
- No calls from mobile apps directly.
- No exposure of the SecretKey in any public client.
2. Security Model
In Secure Integration Mode:Integration APIs (v4.1)
- Only callable from your backend.
- Authenticated by both APIKey and SecretKey.
- Used for: customer creation/updates, points transactions, events, etc.
Customer access to Gameball (widgets / SDKs)
- Tied to a per-customer JWE session token (see separate page).
- The widget still uses
playerUniqueId(your customer identifier). - Gameball validates that:
- The token is signed and encrypted with your SecretKey.
- The
customerIdin the token matches the identity you’re passing.
- A sealed integration surface (only from your servers).
- Per-user authorization for anything the widget shows or does.
3. Migrating Existing Integrations to v4.1
3.1 Inventory your current calls
Find all usages of:- Which endpoints you call.
- Which ones do not include the SecretKey.
- Anything that is currently called from browser JS / mobile is already a security issue and must be moved to your backend.
3.2 Update the base URL
For backend integrations: Changev4.0 to v4.1:
3.3 Enforce SecretKey in every call
For each v4.1 call, make sure you set:APIKeyheader (public key)SecretKeyheader (private key, never exposed to clients)
3.4 Validate server-only usage
Confirm:- No Gameball HTTP call is made from browser JS.
- No Gameball HTTP call is made directly from mobile apps.
- Everything must go: Client → your backend → Gameball v4.1 integrations.
3.5 Stage, test, and deploy
- Deploy to a staging / test environment.
- Run all scenarios:
- Customer creation updates.
- Events and transactions.
- Any custom flows you have.
- Once stable, roll out to production.
4. Minimum Secure Version
Once you are fully on v4.1 and using per-customer session tokens for widgets, you can enforce a minimum allowed version from the Gameball Dashboard.4.1 What Minimum Version does
When you set:- Any integrations call using older versions (v3.0, v4.0, etc.).
- Any widget / SDK access that doesn’t meet secure requirements (e.g. missing session token where required).
- Integrations called through
/api/v4.1/integrations/...with APIKey + SecretKey. - Widgets / SDKs that use
playerUniqueIdand a valid per-customer session token.
4.2 Recommended rollout
Monitoring period
Keep minimum version relaxed.
Monitor logs/dashboard for any remaining older-version traffic.
5. Typical Backend Flow with v4.1
This is about when your backend talks to Gameball in a typical application:Customer Registration
Customer created / registered in your system → Backend calls v4.1 integrations to create a matching Gameball customer.
Profile Updates
Customer profile updated (email/mobile/name/etc.) → Backend calls v4.1 integrations to sync attributes.
Business Actions
Customer performs a business action → Backend logs the event / transaction to v4.1 integrations.
Login Flow
Customer logs in to your app → Backend generates a Gameball session token using their customerId and your SecretKey.
Widget Initialization
Widget / SDK initializes → Frontend / mobile uses playerUniqueId and the session token.
Version Enforcement
Minimum version is enforced → Any old pattern (direct browser calls with APIKey only, old endpoints, etc.) simply fails instead of exposing you.
Base URL
The API base URL for v4.1 integrations:Authentication
Example: Authentication with API Key and Secret Key
Related Documentation
Session Tokens & JWE
Learn how to generate and use per-customer session tokens for widgets and mobile SDKs
API v4.0 Documentation
Reference documentation for the previous API version
Authentication Guide
Detailed authentication instructions and best practices
Migration Guide
Step-by-step migration from v4.0 to v4.1