We're adding the Tickets API to our platform so our users can see the status of their support cases. I need details of "server-to-server oAuth workflow" for HubSpot APIs integration.
Send users installing your app to the authorization URL, where they'll be presented with a screen that allows them to select their account and grant access to your integration. After granting access, they'll be redirected back to your application via a redirect_url, which will have a code query parameter appended to it. You'll use that code and the client secret to get an access_token and refresh_token from HubSpot.
Our app is currently interacting with Hubspot on the backend (no client-side interaction with Hubspot), using a Hubspot API Key. Hubspot API Keys are being sunsetted, so we need to replace it with an alternative (see https://developers.hubspot.com/changelog/upcoming-api-key-sunset)
We cannot migrate to a private app as the documentation I link suggests, so rather, we need to replace API-key authentication with Oauth. Is there a way to do this, completely automated on the server-side without requiring someone to authenticate via a browser?