xAPI Launcher

xAPI has always been a bit like the continuum transfunctioner, as it’s mystery is exceeded only by it’s power.

Hoping to unravel a bit of that mystery, the attached Zip contains two files, a launch HTML file, and a configuration XML file that will allow you to run Lectora published xAPI content from a regular web server, rather than having to load the content on an LMS.

To use the files, just unzip and add them as attachments to your Lectora title, or copy them into the published directory of a Lectora title. Then, rather than launching your content by the normal a001index.html file produced by Lectora, launch it by running the included launch.html file.

So what does this mysterious launch.html file do?

  • loads the parameters from the included XML file
  • prompts the user for any information not included in that configuration file
  • formulates the launch string that loads the course
  • launches the course (in the same window)

So you can preload any information that will always be the same, such as the LRS endpoint, and prompt the user for information that will change per user, such as their email and password. You can modify the configuration file any way you like, so if you don’t need individual logins for each user, you can pre-fill all of the information, and it will run the course immediately, its all up to how you want to organize your information. There is even contextual help available for each parameter that is prompted for by launch.html.

Lets look at the configuration parameters available in launch.xml:

  • launchpage – this is the “start” file that will be launched once the launch string is created. For a Lectora published xAPI title, it is generally a001index.html
  • basicuserid – This is your ID on the LRS
  • basicpassword – This is your password on the LRS
  • email – This email will identify your course results on the LRS
  • endpoint – This is the URL that the course results will be sent to
  • activityid – This is the unique identifier for the course.

Hopefully this utility will do everything you need to get your xAPI off the ground. If you want to dig a little deeper, or set up your launch string on your own, I’ve included a PDF that has all of the details of the launch string for xAPI published Lectora titles, along with some info about a few LRS’s you can try.



Tags: ,


  1. Profile photo of Andrew Corbett
    Andrew Corbett

    Hey John,

    Thanks for posting this. I used it to implement my own launch page that passes in xAPI config params, Terrific help getting me going on a crucial functionality for us.

    Just as an FYI, I had some trouble getting your example to work as is. There seems to be a mismatch between the variable names read in from the xml file and those used in constructing the href.

    A question for you: Have you tried customizing the “context” info set as part of the xAPI statement? I’m beginning to realize this will be important in enabling analytics further down the line — e.g., specifying which PAGE of an activity the learner “interacted” with something. Interested in your thoughts.


  2. Profile photo of John Blackmon
    John Blackmon Post author

    If you could send me a message on the issue I’ll make sure to get it cleared up. I am able to get it working with SCORM Cloud without modification, so not sure what the problem would be.

    On the context question, the xAPI statements from Lectora use context to group the statements specifically for reporting. Those statements that don’t have the object as the course ID have the course ID specified as the parent in their context so that the statements can all be linked together. I suppose the page could be inferred from the sequence of events, as each page is reached, an “experienced” verb is sent (if bookmarking is enabled in publish) giving you which page the user is on.

  3. Profile photo of Andrew Corbett
    Andrew Corbett


    RE: “I am able to get it working with SCORM Cloud without modification, so not sure what the problem would be.”
    Then it must just have been user error. No worries — I truly appreciated having your example to work from.

    Thanks for sharing your thoughts on “context”. What you say makes sense and that may be what I ultimately do. I also think that there are capabilities that haven’t been fully implemented yet by Lectora. But I’m not complaining — we’re all figuring it out and Lectora seems to be ahead of the game with respect to vendors.

    Best wishes,

  4. Profile photo of Jeremy V
    Jeremy V

    Hi John,

    I saw the Inspiration Wednesday yesterday on xAPI and thought that it was great. Thanks for taking the time to do that!

    My question is, the LMS that my organization uses is months (at least) away from supporting xAPI / LRS, but I would like to put together a demo of one of our courses to show some of my team members to build some excitement around what this technology can do. Are you aware of any free resources where one could upload a SCORM packet, take a course, and then report these results?

    Thanks for the time,


  5. Profile photo of John Blackmon
    John Blackmon Post author

    Sure, everything I showed was submitted to SCORM Cloud (cloud.scorm.com) under a free account. Just publish to xAPI and upload!

  6. Profile photo of Rick Vallejo
    Rick Vallejo

    John, is it possible to get the the Lectora washing machine example (AWT) file that shows xAPI examples that you demoed on 2/22? Thanks

  7. Profile photo of John Blackmon
    John Blackmon Post author

    I’ll have it up there tomorrow. Right now the community isn’t letting me upload files of that size, but we are going to update it tonight, and I’ll post it in the morning

  8. Becky

    Hi, is there anything in Lectora 17 that would require revision to these launcher files? Thanks in advance!

  9. Profile photo of Andrew Lian
    Andrew Lian

    Hi John
    I have purchased the grassblade system and installed it (no problems) – but I wonder about how to connect Lectora lessons (with no LMS) to it. I have watched a couple of webinars of yours that have been very helpful, but I see no place in Lectora where I could specify API user and API password. I imagine that this is dealt with in the files attached to this post. I presume they are still valid. Am I right? I do not want to go through any LMS.

    Thanks for any thoughts.

  10. Profile photo of Andrew Lian
    Andrew Lian

    As a followup, I would much prefer not to use any additional files. Is it possible, instead to use a launch string (as per your pdf document) and simply write it in the Activity ID of the XAPI box or some other place?

    Thanks again

  11. Profile photo of Andrew Lian
    Andrew Lian

    I am surely doing something wrong. I have modified the xml file to reflect the LRS parameters, I have included the two files in the title, and have launched on an apache server using launch.html, but i get the form to fill in. and it protests by saying that I must run this file from a web-based server. Clearly, I do not want the form to appear if I run this with students. Any advice? Sorry… I am must be denser than usual today…

  12. Profile photo of Andrew Lian
    Andrew Lian

    Hello John. I found the PDF you were talking about. I am not used to the various files on this BBS. It was actually not with the Lectora files. Anyway, I found it… sorry.

  13. Becky

    Hi, John –

    This should work with a go to action where a page opens in a new window, correct? We’ve got a 1-page course with a 1-page test; We want the test to be open side-by-side with the 1-page of content, but we’re getting an error “Unable to get property ‘LMSGetValue’ of undefined or null reference”

    Thanks in advance!

  14. Profile photo of John Blackmon
    John Blackmon Post author

    It sounds like you want to run some xAPI content along with a SCORM course. In that case, you should add the xAPI pages as an attachment, or just host them outside your LMS and launch it in a new window with a “Go To Web Address” action.

Your email address will not be published. Required fields are marked *