My company is building a design platform that is looking to integrate with hubspot. We already create new users via the forms API and that integration is working well. We would like to take the next step and start creating deals on hubspot. For our platform each design that a user creates represents a sales opportunity and thus should have a deal in hubspot.
I'm confused about the use case for oAuth in hubspot. We wish to call the deals API directly from our server. Does this mean we somehow need to store an access token on our server? Before we perform a request to the deals api do we need to make sure the token is not expired? If our token has been invalided by hubspot do we need to refresh that token somehow and retry the request? Is there are more streamlined way for server to server communication?