What to do if you receive a missing API adapter error
Congratulations! Your learners are ready for that new course you’ve been working hard on. You finally finish it, and you (hopefully) upload it to your Learning Management System (LMS) or to your free SCORM Cloud account for testing before putting it up on the distribution server.
Then the “Unable to Find API Adapter“ error pops up. Noooo! What does it mean?
Take a minute to breathe. It means the JavaScript code in your course that communicates with the LMS can’t start that communication because it can’t find the Application Programming Interface or API adapter.
The API adapter is kind of like a liaison between the course and the LMS that makes a standard set of commands available that allows the course to ask for or send information to the LMS. It’s usually provided and made available by the LMS using a standard name to make it easy.
Without connecting to the API adapter, the course cannot make any requests for information nor can the LMS provide them. That means no bookmarking, no recording progress or completion, no assessment scores – nothing.
Why does the missing API adapter error happen?
There are many reasons this could be happening with your course, but it usually boils down to one of three causes. To understand each one, let’s first look at what happens when a course is launched and attempts to communicate with the LMS.
Course launch
When a learner requests a course, the LMS will launch the course in a window or frameset. The course has a library of JavaScript code, usually in external .js files, that contain functions for carrying out communications. The first thing the code does is try to find the API adapter and initiate communications with the LMS once found. It’ll then request information about the learner and the course. As you go through the course, it typically sends information to the LMS about your completion status and what page you are on.
All this builds one on the other. If the course cannot find the API adapter, it all comes to a screeching halt.
Why can’t it find the API adapter?
-
The course is looking for the wrong adapter.
Most of the code that provides for all the communication is pre-created to do things a certain way. Since the process is intended to work in a very structured way, there’s rarely a need to change it.
The API adapter has a standard name so the course knows what to look for. For SCORM 1.2 courses it looks for “API” and for SCORM 2004 it looks for “API_1484_11”.
What that means is the course is automatically looking for something with a known name in a known location. If it’s not there, you get the error.
There is a JavaScript file usually named either APIWrapper.js (SCORM 1.2) or APIWrapper2004.js (SCORM 2004) that has the job of looking for the adapter.
The first looks for API and the second looks for API_1484_11. If you have the wrong wrapper for your course or the SCORM version support doesn’t match between the course and the LMS, then the course is looking for the wrong file. Make sure SCORM versions match and put the correct wrapper in place.
-
The course is looking in the wrong place for the API adapter.
The LMS launches the course in either a window or frameset depending on how it’s configured. The course, as created, may or may not also contain its own frameset. The APIWrapper looks for the adapter in a particular place based on an expected configuration between course files and the LMS launcher. If the configuration is not what it expects, then it ends up looking in the wrong place. If the file name it looks for is correct, then check for where the APIWrapper is looking for the file.
-
The LMS isn’t putting the API adapter in the correct place.
The LMS is just not putting the API Adapter in a place where the course can find it or not exposing the API Adapter at all. This is the least likely possibility, especially if the LMS is SCORM conformant. Part of the job of SCORM is to tell the LMS how and where to “expose” the API Adapter, and it’s consistent.
One way to test this is to try testing your content in SCORM Cloud for free. If the course runs, then the issue is likely your LMS.
Frustrating but a simple fix
The API adapter error may seem daunting at first, but it’s usually a pretty easy fix that requires a little investigative work.
Have questions? We're here to help.
If you’re interested in learning more about one of our products or want to better understand how this stuff works, reach out!