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

External Tool Sessionless Launches

I've created an external tool that we would like to link to from the Help menu. While I can easily add the link to the tool, the problem is that it (of course) does not receive any user data from Canvas, which is necessary for the tool to work. I was looking at External Tools - Canvas LMS REST API Documentation and found that I can get the tool to work correctly in a new tab when I use a sessionless launch url. The quandary in which I now find myself is this: How can I create a link to a tool (or custom page) that will make the API call to get the sessionless launch url, then redirect the user to that url? Everything I can think of so far will not work:

  1. I can't create a new route in my tool that will handle this because that apparently cannot communicate with Canvas. I have tried this to see what happens (expecting failure) and the tab in which that link opens simply clocks (failed as expected).
  2. I can't link directly to the API call, of course, because that has no capacity for digesting the response and redirecting the user.
  3. I was thinking about possibly adding custom JS at the root account level to make the API call and digest the response, but I can't see any way I could link to that from the Help menu. (I also cannot find where/how I would add custom JS to the root account.)
  4. A button could invoke the JS required as described in #3, but a button can't be added to the Help menu.

Does anyone have other ideas or suggestions, please? Thank you.

1 Reply
Community Member

OK. Turns out that I had a little bit of code wrong and option #1 works.

0 Kudos