title: Hubspot API not Working due to CORS
body: <p>I'm Using Hubspot API in AJAX Request. But showing Following error in <strong>console</strong></p>
  
  <p>So how to enable <strong>Access-Control-Allow-Origin</strong> in Hubspot.</p>
  
  <pre><code>Failed to load https://api.hubapi.com/content/api/v2/pages?hapikey=demo: 
  Response to preflight request doesn't pass access control check: No 'Access-
  Control-Allow-Origin' header is present on the requested resource. Origin 
  'https://preview.hs-sites.com' is therefore not allowed access.
  </code></pre>
  
  <p>If i can't enable <strong>Access-Control-Allow-Origin</strong> in Hubspot, then what is next option to use this API. </p>