LtiLibrary / LtiAdvantageTool

Sample LTI Advantage Tool.
https://advantagetool.azurewebsites.net
MIT License
14 stars 14 forks source link

Score service from LTI Advantage Tool returning 500 status in Canvas #1

Closed greggunderson closed 4 years ago

greggunderson commented 4 years ago

We are working on the Score Service to return grades from our Tool to Canvas and have run into an issue when sending the token request for the client_credentials where we are getting a status 500 internal server error response from Canvas.

We have followed the steps using the OAuth2 Endpoints - Canvas LMS REST API Documentation.

We are generating a token request via a POST /login/oauth2/token with a grant_type of client_credentials and a properly formed JWT signed with our private key. The Scope is https://purl.imsglobal.org/spec/lti-ags/scope/score Here is a sample Score json. { "activityProgress": "Completed", "gradingProgress": "FullyGraded", "scoreGiven": 32.0, "scoreMaximum": 100.0, "timestamp": "\/Date(1572302484610)\/", "userId": "bf14f352-16f3-498d-8f65-780b80b8c581" }

We are able to successfully get the tokens from Blackboard and Moodle with this same workflow.

Does anyone have any suggestions on troubleshooting this?

greggunderson commented 4 years ago

This has been resolved. This was caused by an encoding error in our jwt.

vivekaswal commented 4 years ago

@greggunderson Trying to integrate the same codebase. As per your comment, it works end-to-end. But seems like this is not an active repository. Looking for your suggestion to use this repository.