Developer reference
SCORM 1.2 run-time reference
A practical starting point for understanding course-to-LMS communication. This is a concise guide, not a substitute for the specification.
See the API in action
Run a trusted course and inspect actual calls, returned values and error codes.
Open the course checkerBuilding courses with AI?
Use the local conformance MCP serverAPI methods
SCORM 1.2 uses a JavaScript object named API. Boolean results are strings, not JavaScript booleans.
LMSInitialize("")- Start the run-time session.
LMSGetValue(element)- Read an accessible data model element.
LMSSetValue(element, value)- Write an accessible data model element.
LMSCommit("")- Request persistence of session data.
LMSFinish("")- End the run-time session.
LMSGetLastError()- Retrieve the last error code.
LMSGetErrorString(code)- Get the error description.
LMSGetDiagnostic(code)- Request diagnostic information.
Common data model elements
cmi.core.lesson_status- Lesson status; for example completed, passed or incomplete.
cmi.core.score.raw- Raw score.
cmi.core.lesson_location- Course-defined location or bookmark.
cmi.suspend_data- Course-defined saved state.
cmi.core.exit- Exit state (for example suspend).
cmi.core.student_id- Learner identifier supplied by the LMS (read-only).
cmi.core.session_time- Time spent in the session (write-only).
SCORM 1.2 error codes
- 0 — No error
- A successful call alone does not prove persistence.
- 101 — General exception
- Inspect call context and diagnostics.
- 201 — Invalid argument
- Check method arguments.
- 202 — Element cannot have children
- Check whether the element supports _children.
- 203 — Element not an array
- Check use of _count.
- 301 — Not initialized
- Check initialization and termination order.
- 401 — Not implemented
- Check element name, version and support.
- 402 — Cannot set keyword
- Do not write reserved data model keywords.
- 403 — Read-only element
- Do not write an element that is read-only.
- 404 — Write-only element
- Do not read an element that is write-only.
- 405 — Incorrect data type
- Check the value format and vocabulary.
Reference: SCORM run-time reference; test engine error table.
Test the behavior, not just the code.
Observe the paths that matter, then verify persistence and reporting in the actual LMS.
Test a course