Refresh accessToken for Severless/ Simple Function add-on
Hey ServiceM8 Developer support - I am developing Serverless/ Simple Function add-ons. One of the add-ons is a utility that a user may want to keep open either as a modal or launched from the add-on menu in a dedicated full window. The add-on works, but after 15 minutes (900 seconds) the short-lived accessToken provided by the ServiceM8 Secure Token Service expires.
How is a new access token / refresh token supposed to be issued for this type of app to ensure the user can continue using it without relaunching the app (to acquire a new access token) to keep keep using it?
I see with external web-hosted add-ons, I would simply include code to request a new refresh token when the existing access token gets to the near the end of its expiry. In the case of Serverless/ Simple Function add-ons I'm not sure how to do this via the ServiceM8 Secure Token Service.