Embedding APIs
The Teacharium embedding APIs enable you to securely embed interactive lessons on your website or application using JWT-based authentication.
Overview
Embedding lessons requires two key APIs (see the API section for complete documentation):
- Sign Token API - Generate JWT tokens that grant time-limited access to specific lessons
- Embed Player Data API - Retrieve lesson content for the embedded player using the JWT token
How It Works
- Backend: Your server calls the Sign Token API to generate a JWT token for a specific lesson and learner
- Frontend: Your application uses the token with the Embed SDK to create an iframe
- Iframe: The embedded player validates the token and loads the lesson content
- Communication: Progress and completion events are sent from the iframe to your application
Authentication
All embedding APIs require authentication using your organization’s API credentials. See API Tokens for instructions on creating and managing tokens.
Getting Started
Choose your embedding approach and follow the step-by-step guides:
- Hosted Embedding - Complete guide to embedding lessons on external websites using Teacharium’s hosted infrastructure
- Self-Hosted Embedding - Deploy Teacharium on your own infrastructure (coming soon)
Security Best Practices
- Never expose API keys in client-side code - always generate tokens on your backend
- Do not include PII (personally identifiable information) in userAttributes
- Use appropriate token expiration - default 2 hours, maximum 24 hours
- Serve over HTTPS - both your site and API requests must use HTTPS
Support
If you encounter issues or have questions about embedding, please contact support or check our support documentation.
Last updated on