As you navigate a user through your site, we recommend checking that the user's QuoteMedia session is still valid/active.
In order to check the status of the user's QuoteMedia session, execute the GET call below:
https://app.quotemedia.com/auth/v0/session/{wmId}?sid={sid}
If you have Session ID (SID) in the http header, it will use that for verification. Otherwise, it will look at the cookie set with the JSON Authentication call.
If the session is valid, the call will return status code 200 and will show the following in the body:
{
"sid":"12345678-abcd-1234-ab12-abcd12345678"
}
In your response, "12345678-abcd-1234-ab12-abcd12345678" will be replaced with the user's actual SID.
If the session is NOT valid, the call will return status code 401 and will show the following in the body:
{
"error" : "Not Authorized"
}
Executing the json session call will refresh the timer for the 30 minute sid timeout and can keep the session alive if timed at 28 minute intervals (as an example), if required. If the data service being used includes streaming data, this would not be required. See Important Limitations for more information.