To get session detail, I called an API end
/api/getSession after I successfully get authenticated. But I am not able to get the session detail. Please see the request-response log below.
GET /openboxes/api/getSession HTTP/1.1
"errorMessage": "Cannot get property 'supportedActivities' on null object"
Is there anything missed in my request? Thank you in advance.
Yeah, this is a bug. The
/api/getSession API assumes that you’ve logged in with a location. I’ll add a ticket to fix the bug in
/api/getSession, but as a workaround you can just ensure that your current session is associated with a
"location": "<location id>"
If you’re already logged in and want to switch locations, you can send the following request to change your current location.
Thank you Justin. I tried it with the workaround solution. Now I am able to get the session detail for already login users. Thanks!