We built an application that syncs with clients' CRMs and sends automated text messages from their sales campaigns. New clients are asked to log in and obtain an OAuth Token via Authorization Code Flow. We have a scheduled task that sends an automated text message for any user whose refresh token will expire within two days in order to ensure that users don't have to log in once a week and obtain a new token. This works most of the time, but every so often one of the tokens that we have cached and encrypted fails to refresh when we send the automated text that is supposed to obtain a new token. The error we've been getting for these instances has been an 'OAU-213: Token Not Found'.
Can you provide any insight as to why this might be happening? The most recent instance of this occurred this evening (Thursday) for a user whose refresh token isn't set to expire until Saturday.