Skip to main content

Async / Service-Key Grading

tip

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

info

The AGS and NRPS endpoints accept both the ltik based and service key based API authentication methods.

Due to the nature of LTI®, it's recommended to always utilize the LTI® services synchronously, within the context of an LTI® launch. For most use cases it should be enough and a lot easier to trigger periodic tasks when someone launches into your tool. However, some scenarios make synchronous calls impractical: a nightly job that pushes every student's progress to the LMS gradebook, a webhook from an external grading service that fires hours after the original launch, a roster refresh on a schedule, or a backfill of grades after fixing a scoring bug. For these cases, the ltik token is not suitable, because it expires 24 hours after the launch in which it was issued.

LTIAAS exposes a long-lived alternative called the serviceKey, which is issued during any LTI® launch that has access to the Assignment and Grades or Names and Roles Provisioning services. The serviceKey does not expire, can be persisted in your application's database, and can be used outside of an LTI® launch via the service key based authentication method. This guide walks through the end-to-end pattern for using the serviceKey to submit grades asynchronously: capturing it at launch time, scheduling background jobs, swapping the authentication header, batching score submissions, and surfacing operational health.


What's next

  • Grade Passback flow — the synchronous version of this guide. Read it first to understand the per-user score envelope, then return here for the asynchronous pattern.
  • Names & Roles flow — the same serviceKey technique works for refreshing class rosters from a cron job, outside of a live launch.
  • Accessing the API asynchronously — the underlying authentication method this flow is built on.

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.