I would like to use the Limesurvey API with jquery.
When I try to get the session-key with the following code I get the error message 631: failed to parse request, when I enable the xml rpc. And no response when json-rpc is enabled.
$.post("url_to_survey/index.php/admin/remotecontrol",{
username : "foo", password : "bar"
},
function(data) {
alert('sessionKey: ' + data);
}
);
Could anyone post an example query, please?
Try to force the
dataTypeparameter to your request, like this :Use
dataType: "json"if you enablejson-rpc, etc.Edit : just add the method name