How to get run time application URL

In my application, I am using open authentication. Once logged in to oAuth provided, it successfully redirects to my app url with additional text. i.e. my url changes from <my_app-url>  to  <my_app_url>/token=<token_generated_by_oAuth> e.g. if my url is , it changes to<token_string>. In one of the microflow I want to get run time url which contains that token part. I tried with GetApplicationUrl Java Action from CommunityCommon module , but not sure what should I write in it’s method implementation.   
1 answers

Unfortunately the GetApplicationURL java will only get you the base URL, while your Token URL will not be retrieved by that action since that contains a personal token based on each user login request. 

I might be wrong but if you’re using the SAML module the token is most likely saved in a SAMLSession object as the SessionID, so you could combine the base URL with the Session ID from your SAMLSession to rebuild that initial URL if needed.

Alternatively you’d have to tap into the Java class handling the callback from your OAuth IdP to record the token.

Why would you want to retrieve that URL? The token is only usable for a limited amount of time.

Hope this helps