Hi @tjsimpson ![]()
Based on my experience building HubSpot apps, HubSpot OAuth Refresh Tokens never expire.
You’ll either need to:
- Immediately before each HubSpot API request (other than OAuth requests), use your refresh token to get a new access token (POST https://api.hubapi.com/oauth/v1/token, as per this HubSpot documentation), or
- Store your access tokens and their expiry date in an external database. Then, before each HubSpot API request (other than OAuth requests), check to see if your existing access token is still valid. If not, use your refresh token to get a new one and update your database accordingly (including new access token expiry date).
I hope this proves useful. Please let me know if you have any follow-up questions.