How to get users canvas id through LTI without them interacting with the LTI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The use case is to use the Canvas Live Events webhook to get event information (like a assignment change for multiple students) and then send a notification to the users that it relates to. We would need to determine Canvas user IDs for the students affected by the change. We are a third-party service and so we would not be storing any data. We do use OAuth and the REST API for another part of our service but there would be no way to let our webhook know what the canvas IDs are. I thought we could get the IDs by making a request as an LTI to the names_and_roles endpoint. When making a request to the names_and_roles endpoint it'll return students like so:
{
"status": "Active",
"name": "Jacob Anavisca",
"picture": "https://canvas.instructure.com/images/messages/avatar-50.png",
"given_name": "Jacob",
"family_name": "",
"email": "jacob.anavisca@modolabs.com",
"user_id": "953c289a-d8fa-4975-afe3-5345658c3ae2",
"lti11_legacy_user_id": "1742003b58de4342d9264dced2c8ae3c7e57cc61",
"roles": [
"http://purl.imsglobal.org/vocab/lis/v2/membership#Instructor"
]
}
The user_id and lti11_legacy_user_id do not match the actual canvas IDs. This LTI was only set up in order to get the Canvas IDs so students do not interact with it, no launching. Is there any way to get the actual Canvas ID?