GET Current Session API Call Extending User's Session
Last Updated:
Overview
The goal of this knowledge article is to explain why the user's session is extended when the Retrieve the current Session API is run from the Sessions API.
Applies To
- Sessions API
- Retrieve the current Session
- Retrieve a Session
- Okta Classic Engine
Cause
It is expected behavior for the following call to extend the user's session:
GET https://{OktaDomainName}/api/v1/sessions/me
Solution
The user's session is extended by design when GET https://{OktaDomainNAme}/api/v1/sessions/me is called. The session cookie is grabbed, and the session is extended before the session/me endpoint is reached.
Alternatively, call GET https://{OktaDomainName}/api/v1/sessions/{sessionId}, which does not extend the expiresAt value. For more information, refer to Retrieve a Session.
