Can’t figure out how to build an endpoint for my AJAX in the HubSpot COS… any suggestions appreciated.
Here’s what I’ve done:
When the visitor completes the the quiz the data is pushed to custom properties in their contact record (if they complete the form to become a contact).
Everything was working fine using the HubSpot API Keys (it’s only for our site).
When the site went live last night (using https) all the API Calls fail with the following error:
XMLHttpRequest cannot load https://api.hubapi.com/contacts/v1/contact/utk/XXXXX/profile?hapikey=XXXXX. No ‘Access-Control-Allow-Origin’ header is present on the requested resource. Origin ‘https://www.domain.com’ is therefore not allowed access.
From research online I need to build an endpoint for the AJAX call… the problem is I haven’t been able to figure out how to create an endpoint inside the HubSpot COS.
Any help appreciated.
p.s. posted as a new question just in case it’s useful for someone else.
p.p.s. loads of useful stuff on http://hubhacker.com for PHP users.