Validate Session

Hi everyone,

I would like to know what API methods you use in order to verify that a session is valid before attempting to use it. I have noticed that many methods do not throw an error even if the session no longer exists in T_WEB_SESSION_SESSION.

In order to test this out, I used GetNewSessionKey and I verified that this session exists in the database. Then I deleted the session from T_WEB_SESSION_SESSION using something like this:

delete
from t_web_session_session
where startdatetime > '10-15-2009'

Then, I went back to the API and was able to use UpdateLastAccessTime, and SetVariable, using the same session key, without the API throwing errors.

What is the correct API call to use in order to verify that a session is valid before attempting calls such as GetCart?

Thanks!

Darrin



[edited by: Darrin Katz at 2:08 PM (GMT -6) on 15 Oct 2009]