Incorrect sesskey while responding to LTI Content Item

Incorrect sesskey while responding to LTI Content Item

by Denis L -
Number of replies: 1

Hi there!

I'm a developer and am trying to turn my application into an LTI Tool Provider. I'm using Moodle4Mac (MAMP, Moodle 3.2) as my Tool Consumer to test my implementation of Content Item support.

I am able to receive and authenticate ContentItemSelectionRequest requests from Moodle.

I am constructing a response which I believe matches the LTI spec for a ContentItemSelection. I am signing it with oauth and sending it to the url that is given in the request, in my case:

uri: 'http://localhost:8888/moodle32/mod/lti/contentitem_return.php?course=2&id=4&sesskey=qqF8Vn

However, I get a 404 response from Moodle, with an html body that says:

Incorrect sesskey submitted, form not accepted!


This is surprising... since I am submitting the sesskey right there in the url. I am at a loss of how to debug this further... I've seen some users having issues with sesskey elsewhere, but I don't know enough about Moodle itself to really be able to dig further.

Is this an issue with what I am sending to Moodle? Or is it something about my Moodle session setup?

Average of ratings: -
In reply to Denis L

Re: Incorrect sesskey while responding to LTI Content Item

by John Okely -

Can you check the request is using the URL given by moodle each time?

This error sounds like its using an old url (maybe correct once) and using that each time instead.

Are there any more details you can give us?