Access/Refresh Token Issues with APIv2 Client

I’ve been having a persistent issue with my client’s access and refresh tokens expiring/refreshing on their own and I’m not entirely sure if it’s an issue on my end or an issue on the API’s end.

From the research I’ve done, the access and refresh tokens for newly-created APIv2 clients should now be permanent and not need refreshing. Despite my APIv2 client being created in Oct '19, my access/refresh tokens continually expire after 30 days.

When I first noticed the issue, I wrote a cron function to auto-refresh the access/refresh tokens once a week. Despite the scheduled refreshes, the tokens refreshed automatically after 30 days and invalidated the newest refresh token. This caused the need to contact my project manager to manually refresh the campaign’s tokens.

After that issue, I rewrote the cron function to refresh the tokens when their expiration date occurred. Again, the tokens refreshed automatically and invalidated my client’s stored tokens and, again, my project manager had to manually refresh the campaign’s tokens.

I’m not entirely sure what to do here. Manually having the tokens refreshed monthly is not ideal and I’d like to keep the authentication renewal process as automated as possible. If anyone has any solution or insight on this issue, it would be much appreciated.

Have you tried just refreshing when you get a 401 response (unauthorized) rather than doing it on a schedule?

That is the issue — the refresh token is -also- expiring with the access token. I can’t refresh my access token after my requests start returning a 401, which has been consistently happening every 30 days or so from a manual refresh through the Patreon portal.

I’ll have to see for myself as I just set up my token renewal, but if that’s the case it seems like it would completely defeat the purpose of renewal tokens. Unfortunately patreon’s API is pretty terrible and completely abandoned. You wont get any response from Patreon in this forum (despite what the docs/platform pages say), so if you’re positive this is the case, you should try contacting them directly through email, I believe is the proper address. Be prepared to wait a few weeks for a response. If you do so, please keep us up to date with your findings.

API is not abandoned at all - a lot of high profile apps use the API.

These are just high profile apps using the api - a considerable number developed by Patreon. Then there are major sites or services which integrate via the api - like Reddit.

The documentation seems to follow the development of the api from behind though.