I am trying to build an integration page inside the genesys interface. That works fine but now I would like to access some resources from the platform api. That works also fine BUT I do need to login to get an access token. That seems a little strange as the user has already logged in into the Genesys interface.
Is it possible to get the access token from the current logged in user? I see that it is stored in the local storage but since integration pages are shown in an iFrame I can't reach that from my page...
That's a limitation stemming from the fact that embedded apps are separate applications accessed using an iFrame.
I don't know of any solutions off hand but it wouldn't hurt to use the Ideas Portal to raise the issue so people can consider an alternative for embedded apps.
If you use a "Token Implicit Grant (Browser)" oauth client, you should be able to get a token if the user is already logged into the Genesys UI without logging in again. I would leverage the SDK if possible to minimize the coding involved to handle Oauth flows. Give that a shot and let us know if it works!
If you need direct access to the token from the SDK, you can grab it like this. This is for javascript but you can adapt it to your language of choice.