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.
Cheers,
-Paul