Hi,
If we are correct then you are getting the session id by using user/session service and the session which you are using is in invalidated. If you want to verify the session of the user on the server, then please use this method(
http://api.shephertz.com/app42-docs/session-management-service/#get-session-create ) which will give the session id which exists on the backend,
Please have a look into it and let me know if you still face any issue.
Note: This error comes only when the session id is invalidated. By default, there is no expiry time on the server for session id.
Regards,
Himanshu Sharma