It would help to see the HTML code you are using to try to do the embedding.
I do not think that the regular embedding method makes use of a provided session key (though it should apparently be creating a session_key after the course_password authentication worked). It is intended to work using the fixed user/password provided in the settings, and all users of the HTML page would be treated as the same "daemon" user. See: http://michaelgage.blogspot.com/2015/06/whether-writing-full-text-book-or-just.html
I have beta code for using embedding together with LTI (and grade pass-back) in a PR to make the code public. https://github.com/openwebwork/webwork2/pull/1090 That approach links the connection to the specific user of the LMS, will create a session key, and has a very initial method of recording answers in the WW database. You can take a look and experiment with it.
Some notes about html2xml + UTF-8
I do not think that the regular embedding method makes use of a provided session key (though it should apparently be creating a session_key after the course_password authentication worked). It is intended to work using the fixed user/password provided in the settings, and all users of the HTML page would be treated as the same "daemon" user. See: http://michaelgage.blogspot.com/2015/06/whether-writing-full-text-book-or-just.html
I have beta code for using embedding together with LTI (and grade pass-back) in a PR to make the code public. https://github.com/openwebwork/webwork2/pull/1090 That approach links the connection to the specific user of the LMS, will create a session key, and has a very initial method of recording answers in the WW database. You can take a look and experiment with it.
Some notes about html2xml + UTF-8
- Lite.pm needs a small patch to work well with UTF-8 problems. See: https://github.com/openwebwork/webwork2/issues/967#issuecomment-523941959
- Another UTF-8 issue with html2xml was fixed in https://github.com/openwebwork/webwork2/pull/1089 but that is only in develop at present, and not in main releases of WW.