Skip to main content

OAuth2 with the LMS API

tip

Make sure you've read about authenticating API requests before proceeding to the guide below.

info

The OAuth2 API endpoints only accept the bearer api key based authentication method.

The LTI® protocol covers launches, deep linking, grades, and rosters, but not every operation a tool might need. Some LMSes — most notably Canvas and Brightspace (D2L) — expose a native REST API that goes well beyond the LTI® surface, with endpoints for listing course files, manipulating enrollments, reading non-graded content, posting announcements, and many other operations. These APIs are protected by standard OAuth2 and act on behalf of an individual LMS user, with the user's explicit consent. If your tool needs functionality beyond what the LTI® services provide, complementing LTI® with OAuth2 is the way to go.

LTIAAS gives you access to the OAuth2 handshake through the /oauth/start/:platformId and /api/oauth/access-token/:platformId endpoints. LTIAAS handles redirecting the user to the LMS, accepting the LMS's callback, and exchanging the LMS's authorization code for an access token, so that your application never has to mint its own OAuth client, manage state cookies across the redirect chain, or store the LMS's signing keys. The resulting access token is a Bearer token that your application uses directly against the LMS's REST API.

danger

OAuth2 is a paid add-on. Before you start wiring it up, make sure your LTIAAS plan includes OAuth2 support, or upgrade your existing plan.


What's next

  • Launch + idtoken SSO flow — the typical entry point that establishes a user in your tool before they connect via OAuth.
  • Names & Roles flow — for most roster needs, NRPS is simpler than OAuth2. Reach for OAuth2 only when you need functionality that LTI® does not expose.
  • Grade Passback flow — for standard grading, the AGS service is enough; OAuth2 is only needed for the LMS's advanced gradebook features.

All trademarks, logos, and service marks displayed on this website are the property of their respective owners. LTIAAS is a trademark of GatherAct, LLC, doing business as LTIAAS. Learning Tools Interoperability (LTI)® and LTI® are trademarks of 1EdTech Consortium, Inc. LTIAAS is not affiliated with, endorsed or sponsored by 1EdTech Consortium, Inc. or by any other owners of third-party trademarks used on this website. LTIAAS is not responsible for the content, quality, or accuracy of any websites linked to or from this website that are not owned by LTIAAS. If you have any questions or concerns about the use of any trademarks or content on this website, please contact us.