Teachfloor.js SDK
Use the Teachfloor.js SDK to connect your own web pages to Teachfloor, read user details, react to platform events and trigger actions.
Written by Filippo Schiano di Pepe
Updated
The Teachfloor.js SDK connects your custom web pages to the Teachfloor platform. Use it to personalize what users see, keep your page in sync with Teachfloor and trigger actions in real time.

What the SDK does
- Access user information: get details about the current user, such as their name and profile data, so you can personalize content (for example a custom greeting or course recommendations).
- Respond to changes: react to in-platform events such as page navigation or updates, so your page stays in sync with Teachfloor without reloading.
- Trigger actions: start actions inside Teachfloor, such as showing notifications or updating content.
How to use it
Personalize the user experience
Use API.get() to fetch the authenticated user's details. For example:
- Show a personalized welcome message.
- Show user-specific content based on profile attributes.
Keep your page in sync
Use API.on() to listen for changes and updates inside Teachfloor. For example:
- Update a progress tracker when a user completes a lesson.
- Notify users of new course discussions in real time.
Trigger real-time actions
Use API.emit() to trigger in-platform actions such as notifications. For example:
- Show a toast notification when a learner completes an activity.
- Ask users to confirm before they submit an assignment.
Get started
- Create a Teachfloor app from the Teachfloor dashboard.
- Embed the SDK script in your web page.
- Call the API methods (
get(),on(),emit()) from your page.
For detailed integration steps and examples, see the Teachfloor.js SDK documentation. To learn how apps work, read Teachfloor Apps overview, or build your own custom app with Claude.
Did this answer your question?