OAuth token refresh

I'm trying to create an integration with our CRM, however the application doesn't allow generating a set api key I can continue using, it requires users to log in using OAuth2. I'm using the service to process incoming orders sent to a webhook, and automatically enter them into the system. This means there's a highly irregular and unpredictable input.

My question is, how do I keep refreshing the token, to make sure it doesn't expire (and require user interaction)?
Was this page helpful?