# Making an HTTP request from submitting a form

**URL:** <https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085>\
**Category:** APIs & Integrations\
**Tags:** conversations-inbox\
**Created:** [January 17, 2023, 4:48pm UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085 "2023-01-17T16:48:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mrafey](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mrafey](https://community.hubspot.com/u/Mrafey)\
**Post date:** [January 17, 2023, 4:48pm UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/1 "2023-01-17T16:48:24Z")

</div>

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.

 ![Screen Shot 2023-01-17 at 11.36.34 AM.jpg](https://d2qpr2jzcazej7.cloudfront.net/original/2X/7/79981ad9a84a4fcbd93d587cb8c4ba5ec04d3427.jpeg)

If that is possible, once the request is made, how can I display that information onto the page?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Syeda\_Fatima](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/syeda_fatima/32/36951_2.png) [@Syeda\_Fatima](https://community.hubspot.com/u/Syeda_Fatima)\
**Post date:** [January 18, 2023, 6:27am UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/2 "2023-01-18T06:27:39Z")

</div>

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.

You can find the full documentation for the Contacts API here: [https://developers.hubspot.com/docs/methods/contacts/get\_contact](https://developers.hubspot.com/docs/methods/contacts/get_contact).

You can use the email address of the contact you are looking for to query the Contacts API and retrieve the relevant contact information.

---

<div class="post-metadata">

**Author:** ![Mrafey](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mrafey](https://community.hubspot.com/u/Mrafey)\
**Post date:** [January 18, 2023, 6:32am UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/3 "2023-01-18T06:32:44Z")

</div>

Hello [@Syeda\_Fatima](https://community.hubspot.com/t5/user/viewprofilepage/user-id/114957) . 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!

---

<div class="post-metadata">

**Author:** ![Syeda\_Fatima](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/syeda_fatima/32/36951_2.png) [@Syeda\_Fatima](https://community.hubspot.com/u/Syeda_Fatima)\
**Post date:** [January 18, 2023, 7:15am UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/4 "2023-01-18T07:15:15Z")

</div>

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.

I think you should have a glance again over the documentation for the Hubspot API: [https://developers.hubspot.com/docs/methods/forms/submit\_form](https://developers.hubspot.com/docs/methods/forms/submit_form).

Hope this helps! 🙂

---

<div class="post-metadata">

**Author:** ![Mrafey](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@Mrafey](https://community.hubspot.com/u/Mrafey)\
**Post date:** [January 18, 2023, 7:33am UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/5 "2023-01-18T07:33:48Z")

</div>

[@Syeda\_Fatima](https://community.hubspot.com/t5/user/viewprofilepage/user-id/114957), 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!

---

<div class="post-metadata">

**Author:** ![Syeda\_Fatima](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/syeda_fatima/32/36951_2.png) [@Syeda\_Fatima](https://community.hubspot.com/u/Syeda_Fatima)\
**Post date:** [January 18, 2023, 9:07am UTC](https://community.hubspot.com/t/making-an-http-request-from-submitting-a-form/73085/6 "2023-01-18T09:07:05Z")

</div>

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.
