LTI External Tool - where to get iframe return url without losing LTI Data
- Mark as New
- Subscribe to RSS Feed
- Report Inappropriate Content
I am a developer trying to implement the LTI integrations with our web application. I am a system admin in canvas but am using it like a teacher. I have successfully implemented the LTI return type `lti_launch_url` with my LTI app, but I'm struggling to figure out the proper way to embed an `iframe` without losing the LTI data.
If I only send the URL to the content I'm trying to embed, the iframe loads just the URL and doesn't post any of the LTI data required for authentication.
From what I've read, I need to provide the iframe with a URL that will first launch the LMS to then load my content with LTI Data. The only url in the LTI Data I have to work with are `ext_content_return_url` and `launch_presentation_return_url`. These urls are the same for me and unfortunately it doesn't solve my problem. It doesn't seem to ever launch the content URL and shows a message like 'This popup should go away soon'.
I found this community post that helped me figure out how to accomplish this. If I build the URL manually, I can get the content to embed properly in the iframe while posting the LTI Data to our endpoint.
When I use the `return_type=lti_launch_url`, canvas automatically take my url and places it behind the 'external_tools/retrieve' URL, but when I use the `return_type=iframe` it only uses my content url in the iframe src. This results in an error in my app because the LTI Data is required for authentication.
Here's the structure of that url:
It feels wrong to manually build to URL because it likely won't work in other LMS's, but I can't figure out how to get this url.
FWIW, canvas is using LTI 1.0 and we are working out of a free teacher account.
Does anyone know the proper way to get that `retrieve` url or how to embed an iframe that needs LTI Data? Thank you in advanced!