# 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.

Source: https://support.teachfloor.com/articles/teachfloor-js-sdk  
Collection: Integrations  
Last updated: 2025-02-03

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.

![Teachfloor.js SDK announcement banner with the Teachfloor logo on a dark blue background](https://cdn.sanity.io/images/l9t3o6uq/production/b0a253867c40f534654ea4f4feae52e4d0df0a5e-1675x1040.png)

## 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

1. **Create a Teachfloor app** from the Teachfloor dashboard.
2. **Embed the SDK script** in your web page.
3. **Call the API methods** (`get()`, `on()`, `emit()`) from your page.

For detailed integration steps and examples, see the [Teachfloor.js SDK documentation](https://docs.teachfloor.com/docs/teachfloor-js). To learn how apps work, read [Teachfloor Apps overview](https://support.teachfloor.com/articles/teachfloor-apps-overview), or [build your own custom app with Claude](https://support.teachfloor.com/articles/build-custom-app-claude).
