Is It Possible to Make API Endpoint Calls from a Front-End?
SOLVE
This is more of a sanity check than anything else. We're trying to reduce our public app's architecture complexity as much as possible.
Taking into consideration the OAuth flow required to make requests to HubSpot's API endpoints, is it possible in any way to make a request directly from a static front-end (no server involved)? Or do the OAuth flow and the CORS limitations always prevent that?
I think you're right. The CORS limitations would prevent that. You’ll need a server-side component to handle the token exchange and work around the CORS requirements by acting as a go-between for your API calls.
Josh
Did this post help solve your problem? If so, please mark it as a solution.
Josh Curcio HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers. HubSpot Diamond Partner & HubSpot Certified Trainer
I think you're right. The CORS limitations would prevent that. You’ll need a server-side component to handle the token exchange and work around the CORS requirements by acting as a go-between for your API calls.
Josh
Did this post help solve your problem? If so, please mark it as a solution.
Josh Curcio HubSpot support and inbound marketing for OEMs, contract manufacturers, and industrial suppliers. HubSpot Diamond Partner & HubSpot Certified Trainer