Hi all,
I have been wondering how or if it is possible to be able to make an HTTP GET request to the HubSpot API to retrieve information of a given contact.
So for example on a HubSpot landing page I have setup a form with one field which is email and it has a verify button. What I intend to do is, once the user enters in an email address and clicks verify, an HTTP GET request is sent to retrieve information of that contact if that email matches up with a contact within our contact lists.
Hey @Mrafey, Yes, this is possible. To make an HTTP GET request to the HubSpot API to retrieve information of a given contact, you will need to use the Contacts API.
Hello @Syeda_Fatima . I was able to find that documentation myself yet I am a bit confused on how to tie the request onto that form button within Hubspot when clicked.
How would I be able to do that? Would you have any idea?
Thanks again!
Dear @Mrafey, Yesh, it’s understood, The Hubspot documentation is quite detailed and provides step-by-step instructions on how to create a custom form button and tie it to a request.
So, in this case, i would suggest, the best way to tie a request to a form button within Hubspot is to use Hubspot’s API. This API provides a way to connect your website to Hubspot, allowing you to send data from your website to Hubspot when a form button is clicked.
For example,
you could use the API to send an HTTP request when the form button is clicked. This request would include the information you want to send to Hubspot, such as the form data. You could then use the API to process the request and send the data to Hubspot.
@Syeda_Fatima, I dont think I may have been clear but the form is on a landing page that is setup on HubSpot itself. So, where within HubSpot would I be able to code this HTTP request for that form button? I am just confused as to where I would code this HTTP request as I am new to HubSpot and its platform.
Thank you again!
Dear @Mrafey, The answer to this would depend on what you are trying to do.
If you are looking to set up an HTTP request within the HubSpot platform, then you could use the HubSpot API to add custom functionality to your landing page. The HubSpot API allows developers to access and modify data within the platform.
If you are looking to add an HTTP request to a page on your website that is hosted outside of HubSpot, then you would need to use custom coding on the page itself.