How to get iPlanetDirectorPro cookie through rest api

Hi Experts,
I was trying to get the iPlanetDirectorPro cookie through the below rest API but was only able to get the session handle not the cookie. Essentially that cookie is stored in coreTokenString05.Pls advise how to pull the iPlanetDirectorPro cookie for a specific user.

am655/json/realms/root/sessions?_queryFilter=username eq jack and realm test

thanks

You need to create an authenticated session to get the value that would be used in an iPlanetProCookie

ie

curl \
--request POST \
--header "Content-Type: application/json" \
--header "X-OpenAM-Username: demo" \
--header "X-OpenAM-Password: Ch4ng31t" \
--header "Accept-API-Version: resource=2.0, protocol=1.0" \
'https://openam.example.com:8443/openam/json/realms/root/realms/alpha/authenticate'
{
    "tokenId":"AQIC5wM…​TU3OQ*",
    "successUrl":"/openam/console",
    "realm":"/alpha"
}

The value you want is in tokenId

1 Like

Thanks lot.