AnsweredAssumed Answered

Adding grade to canvas from an external tool (oauth2)

Question asked by Sion Park on Sep 12, 2018
Latest reply on Sep 13, 2018 by Sion Park



I was able to get to the point where you get the access token back, however, I'm not able to move further from here. 

I made a quiz and linked to canvas so when students clicks the link it takes them to the page where they have to authorize. Once they click authorize button, it takes them to the quiz. When they submit the quiz, it returns their answers, right answers, and the score. I want to send the score back to canvas so it automatically updates the gradebook. 

I am using http request "PUT" with the access token as a header to update the grade. It gives me 




Also, when I send the https request, the url is hard coded because I wasn't able to retrieve the course id and the assignment id where the link was clicked. 


uri: "" + userId,
method: 'PUT',
// "Content-Type": "application/x-www-form-urlencoded",
"Authorization": " Bearer " + accessToken
json: {
'submission[posted_grade]': "10",
"workflow_state": "submitted"
},function (er,res,body){
if (!er && res.statusCode == 200) {


In short, could I get help with using access token (received through oauth2) to send the grade back to canvas from an external tool??


Thank you!!