Issue on getting current user sessions

I have gone through the Okta sessions API documentation but however, I did not find a way to get all the user sessions. My goal here is to get the details of all current logged in users.

I got this method from chatGPT and I have tried it using postman web service,
* URL: https://{okta-domain}/api/v1/sessions
* Headers:
* Content-Type: application/json
* Authorization: SSWS {okta-api-token}

The response was,
“errorCode”: “E0000022”,
“errorSummary”: “The endpoint does not support the provided HTTP method”,
“errorLink”: “E0000022”,
“errorId”: “oaeKsh7k04cSgO-fmqy1ZVFnA”,

I double checked header values, permissions and everything. But I haven’t found anything wrong.
How can I get details of all the current logged in users as the admin??

The Sessions endpoint isn’t designed to retrieve ALL active sessions., only information about an individual session. You would need to know a specific session ID to get information back from Okta about the user granted that session: Sessions | Okta Developer

Thank you for the explanation,
Can you please let me know whether there is an end point to get currently logged-in user details?

Only /api/v1/sessions/me and /api/v1/users/me which retrieve data about the currently logged in user based on their session cookie in their browser.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.