Skip to main content
The EngageFabric JavaScript SDK provides a simple, type-safe way to integrate gamification into your applications.

Installation

The EngageFabric SDK is currently available for enterprise customers and early access partners. Contact us at support@engagefabric.com to get access.
Once you have access, install via npm:

Quick Start


Configuration


API Reference

Players

Events

Quests

Adventures

Leaderboards

Lobbies

Chat


WebSocket Client

Connect for real-time updates:

State Management

The SDK includes Zustand stores for state management:

TypeScript Support

The SDK is fully typed:

Error Handling


Best Practices

Never expose your API key in client-side code. Use a backend proxy for browser apps.
For important operations like purchases, always use idempotency keys to prevent duplicates.
Implement proper error handling and retry logic for transient failures.
Use the built-in Zustand stores to cache player data and reduce API calls.

REST API Alternative

If you prefer direct HTTP calls over using the SDK, you can achieve the same operations via the REST API. This is useful for server-side integrations in any language.
For more language examples (Ruby, PHP) and the full REST API reference, see the SDK Overview and API Reference.