AnsweredAssumed Answered

How to refresh or obtain a new token from Portal?

Question asked by paul.haakma on Sep 27, 2015
Latest reply on Oct 2, 2015 by ANohe-esristaff

What would be the correct process for detecting when and then obtaining a new token from Portal when the existing one expires?


One way would be to catch the error message and obtain a new token.


The Portal object in the API has a 'token' property, and an 'expires' property. I guess another method would be to check periodically whether the "expires" property is older than the current datetime.


But how to actually go about obtaining a new token? I expected there might be a method called 'refreshToken' or similar but not that I can find.