Keeping API Sessions alive

Hi,

i have a few Quick Questions about Sessions.

  1. Is there any proper way to check authentication status other that just calling Get Resources and seeing if you get an authentication error. (the “X-Gpgauth-Authenticated” header you get from /auth/verify always is false for me)

  2. Can i Extend a Sessions lifetime by calling a certain function, will any call do or is it not possible?

  3. Is there a time limit beyond which a sessions live cannot be extended?

  1. Can i Extend a Sessions lifetime by calling a certain function, will any call do or is it not possible?

Setting the session.gc_maxlifetime to a bigger value helps.

[Session]
session.gc_maxlifetime=7200

  1. Is there a time limit beyond which a sessions live cannot be extended?

We tested with max 43200 and only one coworker encounter some strange problems (not working for him)

To add to what @Felix said, everytime you make a call the server the session is kept alive, except from one endpoint (see bellow). So you can develop different strategy to check the session status / keep the session alive in the client:

  1. Check the session and “keep it alive”
GET /auth/checksession.json
  1. Check the session but do not “keep it alive”
GET /auth/is-authenticated.json

This is exactly what i needed, thx.