cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Member

No error details reported for invalid LTI configuration JSON by URL

/ucat.json

The content by that URL is:

{
  "title": "Test Tool",
  "description": "My Test Tool",
  "privacy_level": "public",
  "oidc_initiation_url": "https://..com/oidc_initiation_url",
  "target_link_uri": "https://..com/target_link_uri",
  "scopes": [
    "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem",
    "https://purl.imsglobal.org/spec/lti-ags/scope/result.readonly",
    "https://purl.imsglobal.org/spec/lti-ags/scope/score",
    "https://purl.imsglobal.org/spec/lti-nrps/scope/contextmembership.readonly",
    "https://purl.imsglobal.org/spec/lti-ags/scope/lineitem.readonly",
    "https://canvas.instructure.com/lti/public_jwk/scope/update"
  ],
  "extensions": {
    "domain": "devproxy..com",
    "tool_id": "ace_tuition_ucat",
    "platform": "example.platform.com",
    "text": ""
  },
  "public_jwk_url": "https://devproxy..com/public_jwk.json"
}

Now, in Canvas admin panel, I'm adding a new LTI tool and specifying its configuration by entering the URL above.

When I click on the green Save button, a generic error is reported, which is not useful at all.

When I use my developer console to inspect the request that Canvas makes, I can see the following JSON request is sent to the server:

{
  "tool_configuration": {
    "settings_url": "https://devproxy.antonphp.com/ucat.json"
  },
  "developer_key": {
    "name": "Test Tool [do not use for real testing]",
    "email": "me@example.com",
    "redirect_uris": "http://devproxy.example.com/ucat",
    "notes": "This is for development purposes only, never use with real testing!"
  }
}

... and the following response is returned:

{
  "errors": [
    {
      "field": "configuration_url",
      "message": "Content type must be \"application/json\"",
      "error_code": null
    }
  ],
  "error_report_id": "339438"
}

So, the error says something about configuration_url, but I have no idea where it comes from. And there is no other detail reported in the admin control panel where I'm trying to add an LTI tool. I am stuck. Please advise.

Labels (1)
Tags (1)
0 Kudos
1 Reply
Highlighted

For anyone else that comes across this question, I think the issue is that the Content-Type header being returned from https://devproxy.antonphp.com/ucat.json was probably set to "text/html" rather than the expected "application/json".  Even if your page is returning JSON, not setting the proper Content-Type header could be causing Canvas to throw that error.

0 Kudos