How do I make OAuth client token permanent?

My ultimate goal is to keep the polling service running without the need of manual intervention for very long time.
I am not using the npm package because it doesn’t have typings, but the service is pure TypeScript.

Is it possible to have a client token that never expires? If not, how should I code it to refresh the token automatically? New to OAuth2 so I am not expert enough to know how should I do it.

The creator access token should be long lived and should act like an api key for most purposes. However you should still refresh it every once a while, maybe 2-3 months etc.

In Platform | Applications | Patreon I see it occasionally expires, which is…kinda annoying.

I tried this

But it gives me this error (I just refreshed access token). Any idea why?

Tried this as well

Do try doing it via curl or your own app instead of an api helper.