This guide explains how to send learning activity data to LearnCloud using the xAPI (Experience API) standard. LearnCloud is a service that collects and tracks learning experiences across different pl
A LearnCloud-provided JWT token for authentication
A DID (Decentralized Identifier) for the user
The LearnCloud xAPI endpoint URL
If you don't have any of these, check out the and come back here.
Understanding Key Concepts
What is xAPI?
xAPI (Experience API) is a specification that allows you to track learning experiences. It uses a simple structure of "Actor - Verb - Object" to describe activities, similar to how you might say "John completed the course" in plain English.
What is a DID?
A DID (Decentralized Identifier) is a unique identifier for your user that works across different systems. Think of it like an email address that works everywhere but is more secure and private.
Basic Implementation
Here's how to send an xAPI statement to LearnCloud:
DID Usage: Always use the same DID in both actor.name and actor.account.name. This DID should come from your authentication process.
Verb Selection: Use standard xAPI verbs when possible. Common ones include:
attempted
completed
mastered
demonstrated
failed
progressed
Activity IDs: Use consistent, unique URLs for your activity IDs. They don't need to be real URLs, but they should be unique identifiers following URL format.
Authentication: The JWT token should be sent in the X-VP header. This is specific to LearnCloud's implementation.