> For the complete documentation index, see [llms.txt](https://docs.mymedtrics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mymedtrics.com/api-reference/lti-1.3.md).

# LTI 1.3

Register Medtrics in your LMS (Canvas, Moodle, Blackboard): the three URLs, what a launch needs, how grades flow back.

Lets an LMS launch Medtrics as a tool and receive grades back. Register Medtrics once as an LTI 1.3 tool in your LMS; the three URLs below are the same for every institution, only the host changes. The institution's Medtrics administrator does the matching half in **Integrations → Manage LTI Platforms**.

### Register Medtrics in your LMS

| LMS field                   | Value                                                                                                                                                 |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| Login initiation URL (OIDC) | `https://<client-name>.mymedtrics.com/lti/oidc/login`                                                                                                 |
| Redirect URI / target link  | `https://<client-name>.mymedtrics.com/lti/oidc/callback`                                                                                              |
| Tool JWKS URL (public keys) | `https://<client-name>.mymedtrics.com/lti/jwks`                                                                                                       |
| LTI version                 | 1.3 (LTI Advantage)                                                                                                                                   |
| Message types               | `LtiResourceLinkRequest`; a `LtiDeepLinkingRequest` is accepted but Deep Linking is not offered yet                                                   |
| Services                    | Assignment and Grade Services, scope `https://purl.imsglobal.org/spec/lti-ags/scope/score` — Medtrics writes scores, it never reads the LMS gradebook |
| Placement                   | Open in a **new browser tab**; Medtrics does not run inside an LMS frame                                                                              |

Medtrics needs six values from the LMS side in return: the issuer, the authorization URL, the token URL and the platform JWKS URL, plus the client id of the developer key and the deployment id of the installed tool. The administrator enters them in the registration sheet, then runs **Test connection** on the saved platform.

### What happens on a launch

```mermaid
sequenceDiagram
    participant L as Learner's browser
    participant LMS
    participant M as Medtrics
    L->>LMS: opens the Medtrics link
    LMS->>M: GET /lti/oidc/login (iss, login_hint, target_link_uri)
    M-->>LMS: redirect to the LMS authorization URL (state, nonce)
    LMS->>M: POST /lti/oidc/callback (id_token, state)
    M->>LMS: fetch platform JWKS, verify the id_token
    M-->>L: signed in as the linked Medtrics user
```

The id\_token is verified against the platform's JWKS; `iss`, `aud` (the client id), `nonce`, `exp` (2 minutes of clock skew), the LTI version `1.3.0`, the message type and the deployment id must all match the registered platform. The launch does not create accounts: the LMS user (`sub`) must already be linked to a Medtrics user who holds a program membership at the institution, otherwise the learner sees the code `unlinked_user` and the administrator links the account under **LMS user links**.

### How grades go back

Grade passback is one-way, Medtrics → LMS, through LTI Assignment and Grade Services:

1. Place the Medtrics tool as an assignment or link in an LMS course and launch it once as a linked learner — Medtrics records the course context and the gradebook line item.
2. The administrator maps that LMS context to a Medtrics course and adds a **grade sync mapping** (the launched link, a Medtrics course, a numeric score type) and turns its sync on.
3. Scores that are **published** in the Medtrics gradebook for a **linked** learner are posted to the line item as AGS scores (`scoreGiven` / `scoreMaximum`) on **Sync Now** and on the scheduled sync. Nothing is imported from the LMS.

### Public endpoints

| Path                 | Role                                                                                                            |
| -------------------- | --------------------------------------------------------------------------------------------------------------- |
| `/lti/jwks`          | Medtrics' public signing keys, for your LMS to verify the requests Medtrics signs when it posts grades.         |
| `/lti/oidc/login`    | Login initiation. Your LMS sends the learner here first; Medtrics answers with the OIDC authentication request. |
| `/lti/oidc/callback` | Launch. Your LMS posts the signed id\_token here; Medtrics verifies it and signs the learner in.                |

Everything else in the LTI service (key rotation, the connection test, the grade-sync worker) runs inside Medtrics and is not called by an LMS. Not in this release: roster sync (Names and Role Provisioning), Deep Linking, grade import. Questions: <help@medtrics.com>.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mymedtrics.com/api-reference/lti-1.3.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
