Okta session not validating

Hi guys I’m getting success on okta login through
Api v1/authn and getting sessionToken but upon validating it using v1/sessions/{sessionId} it is returning invalid session don’t know where I’m going wrong.

Are you exchanging the sessionToken for an Okta session cookie? You won’t have an active Okta Session until this has occurred. More details here: Sessions API | Okta Developer

Yes and passing the id got in the response to the okta retrive api but still it’s giving invalid session
Kindly refer to attached screen shots


How are you authorizing that request? Did you include an Authorization header containing an API token or access token?

I am passing my Api key in Authorization Header

Hi @andrea
Can you kindly guide me where am I going wrong with this

How are you formatting your Authorization Header? It should look something like this:

Authorization: SSWS 00QCjAl4MlV-WPXM...0HmjFx-vbGua

By placing SSWS before API Key it gives 404
And without it it’s returning invalid session

and does a session with that ID properly exist? As in, was the sessionToken you received from /authn exchanged for a session cookie?

I should also mention that Idx sessions are not supported when making a GET to /api/v1/sessions/${sessionId}

Yes I have exchanged it for session cookie using v1/sessions api
And attaching screen shot of my response
I have tried passing id as sessionId and idp as well but no success