AGS Invalid access token format/ Access token invalid

ImreKinnunen
Community Explorer

I'm working on assignment grading external tool for Canvas and got stuck when trying to access the LTI API.

The end goal is to save the student's result from the external tool in Canvas. Trying to achieve this with line items / LTI 1.3 Assignment and Grading Services.

After completing the OAuth2 Client Credentials Grant, the API does not accept my access_token.

When sending a get request to https://canvas.example.com/api/lti/courses/7264/line_items

with the access_token as a bearer I'm getting a response "Invalid access token format", even though the token is fresh and works with the api routes in this format https://canvas.example.com/api/v1 .

Strangely, when I enter a JWT id_token (sent to my by canvas via the JWT authentication method) as a bearer for the same request the error is no longer about the token format, the message returned is "Access token invalid - signature likely incorrect". However, the api documentation states that Oauth2 access_tokens, not id_tokens should be used with AGS.

Thank you for any tips! Please let know if you need additional information.

 
0 Likes
Users who also had this question