Prerequisites
- Your
applicationIdfrom the Entri dashboard - A valid JWT token fetched from your server
- Basic understanding of JavaScript and DOM events
Installation
Add the Entri SDK to your HTML page:window.entri.
Quick Start
A minimal working example to get started quickly:Full Implementation
Step 1: Create an Entri Manager
Encapsulate all Entri logic in a reusable module for cleaner code.Step 2: Use in Your Application
Event Handling
Entri emits several events during the flow. Set up listeners before callingshowEntri().
onSuccess
Triggered when the user successfully completes domain setup (reaches the Congratulations screen).onEntriClose
Triggered when the modal is closed, whether successful or not.onEntriStepChange
Triggered when the user moves between screens in the modal. Useful for analytics.onEntriManualSetupDocumentationClick
Triggered when the user clicks the manual setup guide link.Common Patterns
Loading State UI
Error Display
Check Domain Before Opening
UsecheckDomain to verify provider support before showing the modal:
Multiple DNS Records
Configure multiple records for complex setups:Troubleshooting
Event listeners not firing
Make sure you’re adding listeners before callingshowEntri():
SDK not loaded
Check that the script has loaded before using it:Multiple event handlers firing
If you’re dynamically adding/removing elements, make sure to clean up event listeners:Next Steps
- API Reference - Full configuration options
- Webhooks - Server-side event handling
- Configure Entri - Dashboard setup and token generation

