Get Current Session API Not returning session

Hi Fellows,

could I ask you please for more information how can I get the ‘sid’ cookie? I’m using the code from this answer, but I’m unable to read any cookie besides the ones available from the XmlHttpRequest.getAllResponseHeaders().
I’m trying to get this information in order to be able to use REST Client on the Server side for the Okta Session Management.

I’d greatly appreciate your answer on my question,
Many thanks and kind regards,
Rama.