cancel
Showing results for 
Search instead for 
Did you mean: 

Locating the Context ID for Zoom LTI Pro Integration

jwadec
Adventurer III
3 5 363

If you are creating Zoom meetings for your faculty using the Zoom API and are interested in having those meetings import into the Canvas Zoom integration, you'll need to locate the context id for each course. Zoom architected their Zoom Meeting upload tool with the context id instead of with the canvas course id. The problem is the context id is not easily available in a canvas report and it is not in canvas data. This context id is only available when an LTI launch is made.

To solve for this, I created a small PowerShell script that will take a CSV file with two columns (canvas_course_id and meeting_id) and loop through the file to find and locate the context ID for each Canvas course. The PowerShell uses the External Tool Sessionless Launch API.

When a Sessionless launch is made, a one time URL is provided. The PowerShell script will launch that one time URL. This is the equivalent of actually launching the tool within the course. The PowerShell script holds all the HTML of the web page into a variable and will locate the context_id string:

<input type="hidden" name="context_id" id="context_id" value="#####" />

 

When the script locates this string, it will remove everything but what is within the value and add that as a record to a CSV file formatted for upload into the Zoom LTI Pro interface.

Once the script loops through all the courses, you'll have a properly formatted file for upload.

PowerShell Script: https://github.com/jwadec/Canvas/blob/main/Get-Context-ID/LTI-Context-ID-Scrapper-Tool.ps1

If you use this script, please let me know! Also, this is as-is and without warranty.

 

-Justin Carrell

5 Comments
ClaireBorja
Surveyor II

Thank you for posting this, I am so frustrated that Zoom gave me the wrong information, when my imports weren't working they elevated my request and I have not heard back.  This would explain why all my imports have been working, but I can't see them in the test courses. 

It is good to know how I could make it work, I will have to work with my team to see if anyone else has experience with using API like this. I have never used an API like this to extract the IDs I am not sure I will learn enough to be able to use this feature.  Very frustrating that they would choose to use an ID that is not easily available.

Thank you for sharing!

 

ClaireBorja
Surveyor II

Hi @jwadec,

I have a follow-up question on the context ID.  Now that you explained this I realize that when Zoom told me to use the ID in the URL they meant the Second number which  I assume is the context ID.  For example, I have a test class with a URL: https://####l.instructure.com/courses/757/modules/items/43748 

Am I correct that the second number "43748" is the context ID? I viewed the page in developer view and it looks like it is the context ID. I used this ID to create an in import (which was successful), but the meeting still doesn't appear in LTI Pro.  

Thank you for the help I have been researching everywhere and can find no information on this topic.

Best,

Claire

jwadec
Adventurer III

@ClaireBorja, I wish!

That is the item id in the module and the 757 number is the canvas course ID. You'd want to launch zoom from a course and do a View Source and locate this line: 

 

 

<input type="hidden" name="context_id" id="context_id" value="#####" />

 

 

The string between the value will be the context id. Zoom support may be getting confused. Blackboard does list the context ID in the URL address.

ClaireBorja
Surveyor II

Hi @jwadec,

I found a team member who is experienced in PowerScript to help me run this. He asked a few questions about the items needed for the script and I wanted to ask you a few questions.  Could I email you? Thank you for all your help!

Best,

Claire

jwadec
Adventurer III

@ClaireBorja 

I sent you a PM with my email address.