We have the Jira<>Smartsheet integration active and in use. We are finding that many of the Workflows that are syncing Sheets to Jira are disabling at an unpredictable volume and frequency.
When reviewing the run logs for these disabled Workflows, I see the error "Your Access Token is invalid". Despite re-enabling the Workflows, they continue to disable at random intervals.
I originally thought the auth settings in our Jira instance could be the issue, but after looking at them there were no settings configured for outgoing auth, only incoming auth. If the outgoing auth had been the issue, then I believe every Syncing Workflow would become disabled consistently and all at once.
I also read that not logging in for 7-days could cause the access token to expire. This is not the case as at least one of our team members logs into the Smartsheet Service account fairly regularly.
When working with an access token, you may need to check what information is associated with it, such as its user or expiry. To get this information you can use our debug tool or you can use the API endpoint.Unless you have sent theexpirytime to your app along with the access token, your app may only learn that a given token has become invalid when you attempt to make a request to the API.
In most apps, the best way to handle expired tokens is to capture the error messages thrown by the API. In each case, the API will return an error message, a code, and a subcode in a JSON body explaining the nature of the error.
For example, if you are working with JSON Web Token (JWT) then it provides a way to solve this issue. Your frontend app can talk to a backend that produces a token. Then your app can then pass that token in anAuthorizationheaderto thebackendto prove they are authenticated and needs access to the particular route or resources. The backend should verify the JWT and grant access based on its validity.