I am trying to close an Okta session from a mobile app (we have a web based login process which we load inside a WebView and the custom IdP sitting in front creates an Okta session)
However, my request fails with this error code - so it is unable to find the endpoint
“errorCode”:“E0000007”,“errorSummary”:“Not found: Resource not found: me (Session)”,“errorLink”:“E0000007”,“errorId”:“oaeTXnnovDURSOJCDUqaAzVjQ”,“errorCauses”:
Which is the correct endpoint to use?
Where can I get the session cookie to set in this request without having access to an API token (for the admin endpoints)
How should the cookie look like in the request? I have been trying to grab the JSESSIONID cookie from the /authorize call (making a guess) and setting it like:
“Cookie”:“JSESSIONID=B8FF753F5F0D8871D7F4F129251EFB7B”
Please let me know if any other information is required
The /sessions/me endpoint is used in the browser to end the user session that was created in that browser, so this should be the right endpoint to use. Because this is a browser request, cookies in the browser just need to be included when the request is made. The cookie in question is the one called ‘sid’ set on the Okta domain.
Hi, thanks for your quick response.
So essentially you mean I cannot make an AJAX request to this endpoint to end the session?
i will have to find some way to load the url in a browser or a webview I guess?
(I have tried this before and it seems to work with the logout endpoint, but I was hoping to have a way to do it by calling an endpoint)