Passing Parameters to LTI Launch URL

Jump to solution
Community Participant

We built an application that is hosted on our private server. As of this point, we were able to embed the app using LTI and iframes. The next phase of our application is to dynamically changed the app content based on who's logged in and what course he/she is currently in.

The question is, is it possible to pass parameters (such as course id and student id) to the LTI Launch URL? Instead of ", it would be something like "" where both course and student values are predetermined by canvas.

That way, we could extract those values via a get parameter and pass it to our application before loading the app in the canvas.

1 Solution
Community Champion


Look at the LTI Variable Substitutions documentation page.

When you add a custom field in the LTI configuration, it gets sent along with the API request.

  • will return the course ID
  • or will return the user ID. If, for some reason, you need the global ID across all Canvas shards, there is also a Canvas.root_account.global_id and Canvas.user.globalId.

In the custom fields, the left side is the name you want to use and the right side is the variable substitution, prefaced with a $. For example:$

In the LTI launch request, the fields names (left side of assignment in the custom fields) are prefixed with custom_ and periods are changed to underscores: would become custom_course_id.

View solution in original post