Looking for integration guides?
- New to Encore? Start with the Getting Started Guide for portal-guided setup
- Step-by-step integration: See the Web Quickstart for detailed installation and configuration instructions
- Framework patterns: Check the Framework Integration Guide for React, Vue, Angular examples
- Advanced setups: This reference section is ideal for looking up specific methods, parameters, and advanced usage patterns
Core Methods
configure()
Initialize the SDK with your public API key and optional configuration
presentOffer()
Display targeted offers to users and handle results
placement()
Fluent builder pattern for presenting offers with chained callbacks
isActive()
Check if a specific entitlement type is currently active
User Management
identify()
Associate your user ID with Encore for cross-device tracking
setUserAttributes()
Set user attributes for targeting and personalization
reset()
Clear user identity, attributes, and cached entitlements
Event Handling & Reactive Updates
on()
Subscribe to entitlement change events
observeEntitlement()
Reactively observe specific entitlement states
refreshEntitlements()
Manually refresh entitlements from the server
Grant Signals & Verification
didGrant()
Notify backend when you’ve granted access to a feature
waitForVerification()
Poll for advertiser verification of a conversion
Error Handling
Quick Reference Example
Here’s a complete example showing the most common SDK methods:TypeScript Support
The SDK includes comprehensive TypeScript type definitions:Method Categories
Initialization
configure()- Initialize the SDKgetVersion()- Get SDK versionsetLogLevel()- Change log level
User Identity
identify()- Identify usersgetCurrentUserId()- Get current user IDsetUserAttributes()- Set user attributesgetUserAttributes()- Get user attributesreset()- Reset all user data
Offer Presentation
presentOffer()- Show offers with promises/callbacksplacement()- Fluent builder for offers
Entitlement Checking
isActive()- Check entitlement statusrefreshEntitlements()- Manually refreshon()- Subscribe to changesobserveEntitlement()- Observe specific entitlement
Grant Signals
didGrant()- Send grant signalswaitForVerification()- Poll for verification
Next Steps
Explore the detailed documentation for each method, or return to the integration guides:- Web Quickstart - Step-by-step integration
- Framework Integration - React, Vue, Angular patterns
- Getting Started - Complete platform overview