Hello, after user authenticates via OAuth2 I request refresh token, which I store on user's mobile device. Now to perform various actions (upload/download) from the user's Dropbox storage, I build:
DbxClientV2(config, credentials)
As I was reading this post https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Is-it-possible-to-get-a-permanent-token-for-uploading-files-to/td-p/712091 it was mentioned that "The SDK will automatically catch expired access token errors and call the API to get a new short-lived access token when needed." What's the correct way for me to catch whether API was called to receive new access token or what would be the best practice to get the new access token and store it for further calls until it expires? Or do I need to do this manually in try { } catch { } or by checking the expiration date of the access token and then call:
client.refreshAccessToken()
Thanks.