Forms Api v3 - Captcha Handling

SOLVE
Highlighted
Occasional Contributor

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

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
Highlighted
HubSpot Moderator

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!

Matthew Willson

HubSpot Developer Support
15 Replies 15
Highlighted
HubSpot Moderator

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!

Matthew Willson

HubSpot Developer Support
Highlighted
Occasional Contributor

Hi @Willson


Thanks for the feedback, unfortunately, we cannot use the form embedded because we had to create a custom field validation to support the accessibility.

We disabled the Captcha and we will migrate the embedded form to API.


Thanks,

Marco Da Re

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Thanks for the update @mdare_usablenet - I'll go ahead and flag this thread as resolved for now but feel free to get back to me should you have any issues in relation to migrating to the API.

Matthew Willson

HubSpot Developer Support
Reply
0 Upvotes
Highlighted
New Contributor

Hi @Willson 
I'm having an issue that's related to this.

My issue is that I need my form to use the form API instead of the embeded one, and be able to use the follow-up email functionality. The problem is that to use the follow-up email functionality, it's required that we have reCaptcha enabled.

 

Is there a way I can use the follow-up email functionality and (not embeded) API forms?

Reply
0 Upvotes
Highlighted
Occasional Contributor

@Willson We're having this same issue where we want to be able to use the follow up email function but we have it setup through the Forms API, which doesn't work when reCaptcha is enabled. We don't need to have reCaptcha enabled on the Hubspot Forms side because we have it already going on our website so it's redundant to do it twice. Why is Hubspot forcing us to use reCaptcha when we don't even need it and not allowing us to use the forms api?

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @Tunch 

 

In order to assist here, I'd need more information on the page, where you're seeing the error and what the error is specifically pointing to. Could you provide this so we can take a look?


Thanks

Matthew Willson

HubSpot Developer Support
Reply
0 Upvotes
Highlighted
New Contributor

Hi again @Willson 

 

So the steps to replicate are:

- create a form on hubspot.

- use something like Postman to test the API (so you don't have to make an actual form to submit).

- if you insert the information correctly, the POST will work and a new entry will show up on the form submissions.

- when you have everything working, edit the form, and add a follow up email.

This will trigger the form to require the captcha (that can not be disabled while you have any follow up email).

- back to Postman, try submiting again. This will fail with an error message saying:

 

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

This is clearly a blocker on hubspot's end. Would it be possible to make the captcha optional for API forms?

Highlighted
Occasional Contributor

^Exactly what @joaobelo  said above. I would be more than happy to jump on a Zoom call and show you what is going on if you need more clarification as well @Willson 

Reply
0 Upvotes
Highlighted
HubSpot Moderator

Hi @Tunch@joaobelo,

 

Thanks for the clarification with that, I am on the same page now. 

However, this issue goes back to my original point. The Forms API does not support Captcha and this is a required step in order to use our Follow-up tool for Forms within HubSpot. 

 

In this case, it means we cannot use our Follow-up tool with the Forms API and an alternative/external option is required. 

 

I hope this helps!

Matthew Willson

HubSpot Developer Support
Reply
0 Upvotes
Highlighted
Occasional Contributor

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. 

Highlighted
New Contributor

+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.

Highlighted
New Member

We would also like to have this feature enabled. We want to use the HubSpot Form Submission API including Captcha + Follow Up Mails without having to embed the HubSpot form. +1

Highlighted
New Member

+1, I was using the api to handle custom form submissions, and also want to be able to use the follow-up email functionality and this is obviously blocking that currently

Highlighted
New Contributor

+1. This is weird not able to use the follow up email feature with API option. 

Highlighted
New Contributor

+1 we would like to do follow-up emails via API submissions too