Access token expired fix and other alternatives
Hi, I faced a similar issue. I used to get an 'access token expired' error message from marketo. To fix the issue, we adopted a naive approach of checking if the 'expires-in' for a particular token is less than 10s,then we added a delay of 11s using Javascript setTimeout wrapped in a promise to call the identity endpoint to generate a new token. This will create a new token each time when 'expires-in' for a current time is less than 10s but the catch here is technically my AWS lambda function is taking 11s more for executing which eventually will increase the lambda costing. Please suggest some alternatives to solve this problem. Although each of our operations takes less than 5 sec and token expiring is a rarity. We are dealing with sensitive data here and can't afford this problem.