<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
0D54z00007UgSXqCANOkta Classic EngineAuthenticationAnswered2024-03-25T15:10:29.000Z2022-03-08T12:17:52.000Z2022-03-09T14:51:20.000Z

40laq (40laq) asked a question.

Verifying SessionId for logged in user.

Hello All,

 

I need to verify whether the current user is eligible to access certain part of the my web application or not. it's very easy to identify on front-end with "api/v1/sessions/me" to check for active session and user detail if user is logged in with Okta UI. same thing I need to do with Python Script. how I can achieve this?

 

I can send session id to Python API which i i'm retrieving from "api/v1/sessions/me", how can i further verify that SessionId is active or not.

 

I'm trying to use following End Point using Python Requests module, which is not working and gives me same error all time.

"api/v1/sessions/${session_id}"

{

"errorCode": "E0000005",

"errorSummary": "Invalid session",

"errorLink": "E0000005",

"errorId": "oae2L4YpvK5StWbHnl0v_p5lA",

"errorCauses": []

}

 

Is there a way to verify Session is active or not for given Session ID from "api/v1/sessions/me".

 

Reference : https://developer.okta.com/docs/reference/api/sessions/*get-current-session


This question is closed.
Loading
Verifying SessionId for logged in user.