APIs & Integrations

th-curran
Member

Form Submit API

SOLVE

Hi all,

 

we are having difficulties using the form submit api. Specifically this endpoint: https://legacydocs.hubspot.com/docs/methods/forms/submit_form

 

We have a regular Hubspot account with the marketing starter enabled. As per this guide https://knowledge.hubspot.com/forms/forms-faq the API functionality should be available to all plans.

 

We created a "regular form" with a single field (email).

Screenshot 2021-08-02 at 19.41.40.png

 

Next, we are trying to post to this form via JS fetch(), via the api. This is the request:

 

 

 

 

 

{method=post, contentType=application/json, url=https://api.hsforms.com/submissions/v3/integration/submit/*portalId*/*formGuid*, followRedirects=true, body={"fields":[{"name":"email","value":"test@example.com"}]}, validateHttpsCertificates=true, headers={X-Forwarded-For=***}, useIntranet=false}

 

 

 

 

 

Portal Id and Form Guid have been removed from the code above before posting this.

 

 The response we get is the following:

 

 

 

 

 

Code: 403
Message:
"Portal isn't allowed to post submissions",
"correlationId":"***"

 

 

 

 

 

 

The only thing related we could find is this (https://community.hubspot.com/t5/APIs-Integrations/Portal-isn-t-allowed-to-post-submissions-on-form-...), which somehow connects the error to needing a cms plan.

 

Unfortunately we have not been able to get a reply from the Hubspot. We have an open ticket for over a week now and they can't figure out, why we are getting the error. An assumptions was, that our API access is blocked, because our account is fairly new.

 

Can anyone help? We had to abbort our advertising campaign and can't get back online without a working form.

 

Thanks a lot in advance.

Thomas

0 Upvotes
1 Accepted solution
th-curran
Solution
Member

Form Submit API

SOLVE

Hubspot got back to us today with the solutions.

 

It turns out, that we can't make request to the API as our account is located in the EU data center, which has it's own API.

 

So the request would look something like this:

 

 

const url = `https://api-eu1.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`;

 

 

instead of:

 

 

const url = `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`;

 

 

 

Please note, that this doesn't seem to affect requests to 'https://api.hubapi.com/' (eg 'get form' as per https://legacydocs.hubspot.com/docs/methods/forms/v2/get_forms)

 
Thanks a lot to all of your help and the Hubspot support team!
 
Thomas

View solution in original post

3 Replies 3
th-curran
Solution
Member

Form Submit API

SOLVE

Hubspot got back to us today with the solutions.

 

It turns out, that we can't make request to the API as our account is located in the EU data center, which has it's own API.

 

So the request would look something like this:

 

 

const url = `https://api-eu1.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`;

 

 

instead of:

 

 

const url = `https://api.hsforms.com/submissions/v3/integration/submit/${portalId}/${formGuid}`;

 

 

 

Please note, that this doesn't seem to affect requests to 'https://api.hubapi.com/' (eg 'get form' as per https://legacydocs.hubspot.com/docs/methods/forms/v2/get_forms)

 
Thanks a lot to all of your help and the Hubspot support team!
 
Thomas
dennisedson
HubSpot Product Team
HubSpot Product Team

Form Submit API

SOLVE

@th-curran 

Sorry this is taking longer than you would like 😥

I have spoken with support and they are working on it. 

Could you do me a favor and add the correlation id (you *** it out.  There is nothing in the ID to worry about exposing)

Also, could you get to me the date and time that you received  that specific error with that correlation id?

 

Thanks in advance!  I know the team is working on it and you should hear back from them soon.

0 Upvotes
th-curran
Member

Form Submit API

SOLVE

Hi Dennis,

 

thanks for your reply. Sorry for keeping both you and support working on this issue. My marketing team are getting frustrated, as i insisted on using Hubspot and now it seems it's the one thing show stopping our ad campaign.

 

Here is the correlationId: 898cca2c-0b16-4ebb-953d-056633772dbb

2021-08-02; 23:41 CET; 2:41 pm GMT-7

 

Perhaps you could help me rule out some non-tech questionmarks?

 

Is there any plan constraint on using the API, or more specifically the Form Submit API Endpoint? I couldn't find anything online.

 

Is there any other admin console setup to be done, apart from creating the form and an API Key?

 

Thanks a lot for your and your team's help! I really appreciate it.

 

Thomas

0 Upvotes