Unable to pass custom data in LTI Launch request. What is the correct way?

Jump to solution
oloff_b
Community Novice

Hi everyone,

I am trying to pass custom data for a deep linking assignment placement. The custom data is set in the lti deep linking response, as part of the lti resource link item. Then, it needs to be available on the https://purl.imsglobal.org/spec/lti/claim/custom claim in the lti launch request to the tool.

Here is an example of what I have in the deep linking response when the assignment gets created:

...

"https://purl.imsglobal.org/spec/lti/claim/version": "1.3.0",
  "https://purl.imsglobal.org/spec/lti-dl/claim/content_items": [
    {
      "type": "ltiResourceLink",
      "title": "Test assignment",
      "text": "A test assignment",
      "url": "somelink...",
      "lineItem": {
        "scoreMaximum": "10",
        "label": "Assignment",
        "resourceId": "1234"
      },
      "window": {
        "targetName": "MyTool_1592687225123_1234",
        "windowFeatures": "menubar=yes,location=yes,status=yes,resizable=yes,scrollbars=no"
      },
      "iframe": {
        "width": 800,
        "height": 600
      },
      "custom": {
        "assignment_type": "specific_assignment_type",
        "assignment_id": "1234_5678"
      }
    }
  ]

Here is the problem: when I try to access the https://purl.imsglobal.org/spec/lti/claim/custom property in the lti launch request message, it is empty. It seems like my custom data isn't being passed in the launch request.

Does anyone know what I am doing wrong? Is this the correct way to pass custom data to the launch or is it supposed to be done differently?

I'd really appreciate any help on this.

Labels (1)
1 Solution
oloff_b
Community Novice
Author

The workaround for this was to simply pass the data in the query string. E.g.

{
      "type": "ltiResourceLink",
      "title": "Test assignment",
      "text": "A test assignment",
      "url": "myResourceLink?assignment_id=1234567",
      "lineItem": {
        "scoreMaximum": "10",
        "label": "Assignment",
        "resourceId": "1234"
},

....

It seems that Canvas will only allow passing variable substitution values as custom data in the launch. This must be configured in the tool settings and cannot be modified by the tool itself in the deep link response.

View solution in original post

0 Likes