APIs & Integrations

mdare_usablenet
Member

Forms Api v3 - Captcha Handling

SOLVE

Hello,

I followed the post: https://community.hubspot.com/t5/APIs-Integrations/Forms-Api-Captcha-Handling/m-p/248803/highlight/f... and I tried to upgrade to v3 but I still receive the reCAPTCHA error message by API

errors": [
    {
      "message": "Form '********' can't receive API submissions as Captcha (SPAM prevention) is enabled.",
      "errorType": "FORM_HAS_RECAPTCHA_ENABLED"
    }
  ],

By the previous comments, I understood the v3 works with reCAPTCHA enabled but I don't know what I wrong. Could you help me?

 

URL https://api.hsforms.com/submissions/v3/integration/submit/:***/:***

BODY:

{
  "submittedAt": "1582798776000",
  "skipValidation": true,
  "fields": [
    {
      "name": "firstname",
      "value": "test"
    },
    {
      "name": "lastname",
      "value": "test"
    },
    {
      "name": "company",
      "value": "Test"
    },
    {
      "name": "email",
      "value": "****"
    }
  ],
  "context": {
	"hutk": "***********",
        "pageUri": "test.com",
        "pageName": "test page",
        "ipAddress": "**.**.**.**"
  }
}

Thanks,

Marco

0 Upvotes
1 Accepted solution
Willson
Solution
HubSpot Employee
HubSpot Employee

Forms Api v3 - Captcha Handling

SOLVE

Hi @mdare_usablenet 

 

To confirm, this issue is being encountered due to the fact that Captcha is enabled for the form you're attempting to pass submissions to via the API. 

 

We do not support the use of Captcha when using the v2 or v3 endpoints. However, if you wish to use Captcha services, you can have these embedded on the page itself, not using the HubSpot functionality and this will work fine as we do not process any validation for incoming data. It is only once the data has been received that we process validation and in this case return 400 errors with the following:

{"status":"error","message":"The request is not valid","correlationId":"xxxx","errors":[{"message":"Form 'FORM_GUID' can't receive API submissions as Captcha (SPAM prevention) is enabled.","errorType":"FORM_HAS_RECAPTCHA_ENABLED"}],"requestId":"xxxx"}

Also, to touch on the Forum post you linked, the Solution that is marked there does not confirm that this should work, rather it states that the v3 endpoint is more flexible in it's functionality but it would still require investigation. 

 

I hope this helps!

Product Manager @ HubSpot

View solution in original post

22 Replies 22
digivizer
Participant

Forms Api v3 - Captcha Handling

SOLVE

+1 Please make this optional, it should be our choice to introduce more friction to forms in order to limit spam anyway, not forced by Hubspot. If not at least allow the Forms API to bypass it.

Tunch
Contributor

Forms Api v3 - Captcha Handling

SOLVE

That doesn't help unfortunately and I was hoping that you guys would be open to fixing that poor design. We should not be forced to be using Captcha when doing a follow up email, especially if we're already doing it on the front end of our website.