← Learnmersive DevelopersPARTNER INTEGRATION GUIDE
Integrate a Learnmersive catalogue
Synchronise content on your server, then embed published Experiences or active Live Lessons in your product. Your backend can also issue a short-lived launch URL for an external Live Lesson teacher.
Integration flow
- 1. Sync
Read the two catalogue resources from your server.
- 2. Save state
Store each resource's final sync cursor independently.
- 3. Select
Use an Experience playerCode or a Live Lesson external id.
- 4. Embed
Render the public iframe URL in an approved parent page.
- 5. Teach
Issue a one-time teacher URL from your backend.
Authentication
Send the issued key as a Bearer token. The key must be active and have catalogue:read to synchronise content or live-lessons:teach to create teacher launches. Keep it in server-side secret storage: never expose it in browser code, an iframe URL, or a public client bundle.
Sync behaviour
Page through the first complete snapshot, store the final syncCursor, then use it for incremental updates. Withdrawn records are returned as tombstones. Experience and Live Lesson cursors are separate and bound to your catalogue.
1. Read the catalogue from your server
Your issued key selects the catalogue, so neither request includes a Partner identifier. Fetch Experiences and Live Lessons separately; each has its own cursor stream.
Experiences
curl --request GET \
--url 'https://api.learnmersive.com/api/partner/v1/catalogue/experiences?limit=100' \
--header 'Authorization: Bearer YOUR_PARTNER_API_KEY'
Live Lessons
curl --request GET \
--url 'https://api.learnmersive.com/api/partner/v1/catalogue/live-lessons?limit=100' \
--header 'Authorization: Bearer YOUR_PARTNER_API_KEY'
For the first sync, follow meta.nextCursor until it is null, then store that response's meta.syncCursor for that resource. Supply the saved cursor in later requests to receive incremental changes. Remove every entry in withdrawn from your catalogue; these tombstones are not embeddable content.
2. Choose the content to embed
Experience and Live Lesson catalogue entries each include a stable external id, title, description, thumbnail URL, subject, age range, curriculum tags, and updatedAt. They use separate endpoint paths, publication records, and cursors.
Use an Experience's playerCode for the Player URL. Use a Live Lesson's catalogue id as the liveLessonId in its embed URL and as the externalId in its teacher-launch API path. These are catalogue identifiers, not internal Learnmersive IDs.
4. Start an external teacher session
Call this endpoint only from your backend with a key that has live-lessons:teach. Pass the teacher's display name for this launch. The response contains a one-time Player URL, not an API credential.
curl --request POST \
--url 'https://api.learnmersive.com/api/partner/v1/live-lessons/{externalId}/teacher-launch' \
--header 'Authorization: Bearer YOUR_PARTNER_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"teacherDisplayName":"Dr. Rivera"}'
Use launchUrl as a top-level navigation or as the source of a newly created iframe. It is valid for five minutes and can be exchanged once. The resulting teacher session is scoped to that one Live Lesson, uses a tab-level header session rather than a third-party Cookie, and expires after eight hours. Revoking the API client, withdrawing its publication, or ending the lesson stops it immediately.
The teacher can control the current classroom: participant visibility, operator takeover, scene, hotspot, map, media, PDFs, activities, and activity response results. Presentation candidates are restricted to published content from this lesson's organization. The session never grants CMS access, course management, or access to another Partner, organization, or Live Lesson.
Embed a teacher
Create the launch URL on your server, then use it directly as the initial iframe source. Do not redirect it through your own endpoint, persist it, or reuse it after it has been consumed. The teacher page removes the launch parameter once the session starts.
<!-- launchUrl is created by your backend; never expose the API key -->
<iframe
src="{{ launchUrl }}"
title="Learnmersive Live Lesson teacher"
width="100%"
height="720"
style="border: 0;"
allowfullscreen
></iframe>
3. Embed in your product
Replace the placeholders with the values supplied for your integration and returned from your synchronised catalogue. The iframe is public and must not include an API key.
Experience Player
Available only while the catalogue publication and Experience are both published.
<iframe src="https://player.learnmersive.com/{partnerSlug}/{playerCode}" title="Learnmersive Experience" width="100%" height="600" style="border: 0;" allowfullscreen></iframe>
Live Lesson
Available only while its catalogue publication is published and its classroom is active.
<iframe src="https://join.learnmersive.com/embed/{partnerSlug}/{liveLessonId}" title="Learnmersive Live Lesson" width="100%" height="720" style="border: 0;" allowfullscreen></iframe>
Embed origins and troubleshooting
Parent-page access
When no embed origins are configured, Experience, student Live Lesson, and teacher iframes retain the existing permissive embed behaviour. When origins are configured, your parent page must match one full HTTPS origin exactly, such as https://app.example.com. Local HTTP localhost origins are supported for development. The browser enforces this via the frame-ancestors CSP directive.
A teacher iframe keeps its session in that iframe's browser context and sends it as a request header; it does not require third-party Cookies. Browser privacy settings, however, can still affect media permissions and autoplay, so provide a visible start-control in your host page when needed.
Common checks
401 or 403: call the API from your server and verify the active key and catalogue:read or live-lessons:teachscope required by the endpoint.404: resynchronise the catalogue and verify the public identifier and required published or active status.- Refused frame: ask a Learnmersive administrator to add the exact parent origin in Partner integrations → Embed origins.
Custom metadata
Configured values appear in the optional metadata object of either catalogue entry type. Fields may be absent when no value is set for an entry. Treat this as catalogue data only; it does not change the public iframe URL or embed behaviour.
The available fields, value types, and requirements are supplied separately during your Partner integration. Validate and store those values according to that integration contract.