Edit

Auth modes

Every request carries at most one credential. Which one decides what the API lets you do.

ModeHow the client gets itActs as
AnonymousNo token, getToken or sessionA visitor: public courses only
User sessioncredentials: 'include' (the LH_access cookie on the instance's domain), or token / getToken with an access token from auth.login()That user, with their roles in each org
API tokentoken: 'lh_…', on a serverThe organization, with the token's rights, capped by its creator's role
Embed sessionsession / getSession with a token from embed.createSession()One learner, inside one org, on the embed routes only

A cookie session and a bearer user token are the same mode: the API treats them identically. The tables below call both Session.

The tables were checked against a running API (OSS, single organization) with the SDK's integration suite and a probe of each method in each mode. "Yes" means the API accepts the credential; the user still needs the right role for the data (RBAC applies on top). On LearnHouse Cloud some resources also need a plan: certificates and learning paths (Pro), communities and user groups (Standard), the Admin API and API tokens (Pro).

What a refused mode returns:

SituationStatuserr.code
No credential on a route that needs one401HTTP_ERROR
API token on a session-only route (accounts, progress, notifications…)403HTTP_ERROR (detail says API tokens are not allowed)
Embed session outside the embed routes403EMBED_SESSION_ROUTE_NOT_ALLOWED
Embed session for another organization403SESSION_NOT_BOUND_TO_ORG
User session on the Admin API403HTTP_ERROR

Content

MethodAnonymousSessionAPI tokenEmbed
orgs.get, orgs.getByUuidYesYesNo (403)Yes
orgs.resolveDomainYesYesYesYes
courses.list, courses.listAll, courses.count, courses.searchYes (public courses)YesYesNo
courses.get, courses.getById, courses.getMetaYes (public courses)YesYesYes
courses.listUpdatesYesYesYesNo
chapters.get, activities.listForChapterYesYesYesNo
chapters.listForCourse, activities.get, activities.getById, activities.resolveYesYesYesYes
search.org, search.orgPagesYesYesYes (search right)No
podcasts.*Yes (public podcasts)YesYesNo
instance.infoYesYesYesYes

Accounts

MethodAnonymousSessionAPI tokenEmbed
auth.login, auth.loginMfa, auth.loginWithOAuth, auth.signup, auth.requestMagicLink, auth.verifyMagicLink, auth.verifyEmail, auth.resendVerification, auth.requestPasswordReset, auth.resetPasswordYes (no credential is sent)n/an/an/a
auth.refreshWith a refresh tokenn/aNoNo
auth.meNo (401)YesYesNo
auth.logoutNo (401)YesNo (401)Yes: revokes every session of that learner
auth.mfa.*NoYesNoNo
users.sessionNoYesNoYes
users.getById, users.getByUuid, users.getByUsernameNo (401)YesNoYes
users.profilePlaceholder (id 0)YesNoNo
users.update, users.updateAvatar, users.changePassword, users.getPreferences, users.updatePreferences, users.deleteAccount, users.listCoursesNoYesNoNo
orgs.listMine, orgs.join, orgs.leaveNoYesNoNo

Learning

MethodAnonymousSessionAPI tokenEmbed
trail.get, trail.startCourse, trail.leaveCourseNo (401)YesNoNo
trail.getForOrg, trail.getCourseProgress, trail.completeActivity, trail.uncompleteActivityNo (401)YesNoYes
assignments.get, assignments.getForActivity, assignments.listTasks, assignments.getTaskNoYesYesYes
assignments.listForCourseNoYesYesNo
assignments.listMine, assignments.getMySubmission, assignments.getMyTaskSubmissions, assignments.getMyTaskSubmission, assignments.uploadTaskFile, assignments.retryNoYesNoYes
assignments.saveTaskSubmission, assignments.submitNoYesYes, with onBehalfOfUserIdYes
assignments.getGradeNoOwn gradeYesOwn grade
certificates.get, certificates.verify, certificates.getForCourseYesYesYesNo
certificates.listMine, certificates.listMineForCourseNoYesNoNo
paths.list, paths.listForCourse, paths.get, paths.getCertificateYesYesYesNo
paths.listMine, paths.enroll, paths.leave, paths.listMyCertificatesNoYesNoNo
notes.*, calendar.eventsNoYesNoNo

Community and inbox

MethodAnonymousSessionAPI tokenEmbed
communities.list, communities.listAll, communities.summaryYes (public communities)YesYesNo
communities.activityNo (401)Admins onlyYesNo
communities.get, communities.getForCourse, communities.listDiscussionsYes (public communities)YesNoNo
discussions.labelsYesYesYesYes
discussions.get, discussions.listComments, discussions.countComments, discussions.listReactionsYes (public communities)YesNoNo
communities.createDiscussion, discussions.update, discussions.delete, discussions.reply, discussions.updateComment, discussions.deleteComment, discussions.vote, discussions.unvote, discussions.voteComment, discussions.unvoteComment, discussions.reactNoYesNoNo
notifications.*NoYesNoNo
usergroups.listMine, usergroups.joinNoYesNoNo

Server side

MethodAnonymousSessionAPI tokenEmbed
embed.createSessionNoNo (403)Yes (users: update)No
admin.*NoNo (403)Yes (see each method's right)No

The Agent API

lh.agent (Atlas, the learner copilot, custom agents) is an Enterprise feature with its own rules; see Agent API security. Embed sessions reach the learner side of it.