Logout REST method returning 'Session expired or invalid

Posted by SteveBos on 23-Mar-2017 10:24


We have an app that logs into a rollbase session, gets a few pieces of information, then logs out. Everything works great until the logout part. Here is my code and subsequent error and output.

diyLogout: function (success, error) {
     var data2 = {
     "sessionID": dmsi.model.session.diySessionID,
     "output": "json"
     this._ajaxCall2("GET", "logout", data2, success, error);

_ajaxCall2: function (type, method, data, success, error) {

    var rollbaseUrl = dmsi.config.rollbaseSettings.baseUrl + method + '?' + $.param(data);

    var options2 = {
    url: rollbaseUrl,
    contentType: 'application/json',
    success: function (rsp) {

    $.ajax(options2).fail(function (err) {

         logWriter.writeLog("model.js",0,"ajaxCall2 failed");


diy.dmsi.com/.../logout 403 (Forbidden)
Object {readyState: 4, responseText: "{ "status": "login", "message": "Session expired or invalid login credentials" }", responseJSON: Object, status: 403, statusText: "Forbidden"}

I've triple checked the session id against the user access log so I know it's valid. Now, that user was already logged in so rollbase kicked the previous one out. Could that be the cause? This should be about as straight forward as it gets so what am I missing?


All Replies

Posted by Ricardo Rafols on 28-Mar-2017 09:56

Hi Steve,

Try using sessionId instead of sessionID when creating data2 array.

Your program is doing:


but should be doing:



Posted by SteveBos on 28-Mar-2017 10:17

Arrggghhh! I wish I could say that's the first time I've been bitten by that. Thanks Ricardo!

This thread is closed