<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Recaptcha Invalid domain for site key in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999904#M74710</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/786173"&gt;@MSHydroNeo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's a valid thought!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While it might seem convenient to allow localhost in the reCAPTCHA admin console, it's not a feasible option since HubSpot has control over the reCAPTCHA settings for their forms.&lt;/P&gt;
&lt;P&gt;Instead, the recommended approach is to set up a temporary subdomain in your local development environment, such as (dev.yourwebsite.com) Then, generate a new reCAPTCHA key pair specifically for this subdomain in the Google reCAPTCHA Admin&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/recaptcha/admin/create" target="_blank"&gt;https://www.google.com/recaptcha/admin/create&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;portal.&lt;/P&gt;
&lt;P&gt;Ultimately, update your HubSpot form settings to utilize the newly generated keys, ensuring a secure and functional&amp;nbsp;implementation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jul 2024 11:47:38 GMT</pubDate>
    <dc:creator>Humashankar</dc:creator>
    <dc:date>2024-07-02T11:47:38Z</dc:date>
    <item>
      <title>Recaptcha Invalid domain for site key</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999318#M74676</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I am building a website using Flutter for Web. I am facing one issue when embedding my HubSpot Form into an iframe to display on the web. Code Below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;import 'package:flutter/material.dart';
import 'dart:html' as html;
import 'dart:ui' as ui;

class WhistleblowerForm extends StatefulWidget {
  const WhistleblowerForm({super.key});

  @override
  State&amp;lt;WhistleblowerForm&amp;gt; createState() =&amp;gt; _WhistleblowerFormState();
}

class _WhistleblowerFormState extends State&amp;lt;WhistleblowerForm&amp;gt; {
  late html.IFrameElement _element;

  @override
  void initState() {
    _element = html.IFrameElement()
      // ..width = "200px"
      // ..height = "200px"
      ..style.border = 'none'
      ..srcdoc = """
        &amp;lt;!DOCTYPE html&amp;gt;
        &amp;lt;html&amp;gt;
          &amp;lt;body&amp;gt;
            &amp;lt;script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/embed/v2.js"&amp;gt;&amp;lt;/script&amp;gt;
            &amp;lt;script&amp;gt;
              hbspt.forms.create({
                region: "na1",
                portalId: "5586633",
                formId: "7b811c72-c39d-416f-a53b-46a64208cff0"
              });
            &amp;lt;/script&amp;gt;
          &amp;lt;/body&amp;gt;
        &amp;lt;/html&amp;gt;
        """;

    // ignore:undefined_prefixed_name
    ui.platformViewRegistry.registerViewFactory(
      'HubspotForm',
      (int viewId) =&amp;gt; _element,
    );

    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return const SizedBox(
      width: 867,
      height: 833,
      child: HtmlElementView(viewType: 'HubspotForm'),
    );
  }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reCAPTCHA is producing the following error:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MSHydroNeo_0-1719806122740.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/120799iF98FDAC75EADD199/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MSHydroNeo_0-1719806122740.png" alt="MSHydroNeo_0-1719806122740.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Seems that there is no way of accessing or updating the recaptcha key because it is all handled by reCAPTCHA. Disabling the reCAPTCHA allows the form to be submitted successfully but this is not my ideal scenario as I want to keep spam protection. The domain for the development is localhost.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anybody have any ideas on what I can do here?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 04:00:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999318#M74676</guid>
      <dc:creator>MSHydroNeo</dc:creator>
      <dc:date>2024-07-01T04:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: Recaptcha Invalid domain for site key</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999455#M74679</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/786173"&gt;@MSHydroNeo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This issue arises from a mismatch between the registered domain and localhost. To resolve this, you can either deploy your app to a temporary public domain during development and register that domain with your reCAPTCHA key which is recommended&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Else, allowlist localhost in the reCAPTCHA admin console for testing purposes only -not recommended for production due to security risks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To allowlist localhost, follow these steps - log in to the Google reCAPTCHA admin console, select your reCAPTCHA v2 project, and add localhost to the allowed domains under "Settings" -&amp;gt; "Domains".&lt;/P&gt;
&lt;P&gt;Confirm the correct site and secret keys in your HubSpot form code and update the script to the latest HubSpot form embed script in the iframe. Consider to disable the allowlist before deployment.&lt;/P&gt;
&lt;P&gt;By trying the above steps you may be able to fix the issue&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Hope this helps - Happy to help further!!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Thank you very much and have a great one!&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Warm regards&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Jul 2024 12:02:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999455#M74679</guid>
      <dc:creator>Humashankar</dc:creator>
      <dc:date>2024-07-01T12:02:13Z</dc:date>
    </item>
    <item>
      <title>Re: Recaptcha Invalid domain for site key</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999782#M74705</link>
      <description>&lt;P&gt;Hi Humashankar,&lt;BR /&gt;&lt;BR /&gt;Yes, I had thought about this previously about allowlisting the domain. However, since the reCAPTCHA is handled through Hubspot Forms (just switch it on, no additional settings), I do not think I have access to an admin console or any additional settings in regards to the reCAPTCHA on Hubspot forms so I am unable to add localhost to the list of trusted domains.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 02:38:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999782#M74705</guid>
      <dc:creator>MSHydroNeo</dc:creator>
      <dc:date>2024-07-02T02:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Recaptcha Invalid domain for site key</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999904#M74710</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/786173"&gt;@MSHydroNeo&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's a valid thought!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;While it might seem convenient to allow localhost in the reCAPTCHA admin console, it's not a feasible option since HubSpot has control over the reCAPTCHA settings for their forms.&lt;/P&gt;
&lt;P&gt;Instead, the recommended approach is to set up a temporary subdomain in your local development environment, such as (dev.yourwebsite.com) Then, generate a new reCAPTCHA key pair specifically for this subdomain in the Google reCAPTCHA Admin&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.google.com/recaptcha/admin/create" target="_blank"&gt;https://www.google.com/recaptcha/admin/create&lt;/A&gt;)&lt;/P&gt;
&lt;P&gt;portal.&lt;/P&gt;
&lt;P&gt;Ultimately, update your HubSpot form settings to utilize the newly generated keys, ensuring a secure and functional&amp;nbsp;implementation.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Regards&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2024 11:47:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/999904#M74710</guid>
      <dc:creator>Humashankar</dc:creator>
      <dc:date>2024-07-02T11:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: Recaptcha Invalid domain for site key</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/1159615#M82400</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;since the reCAPTCHA is handled through Hubspot Forms (just switch it on, no additional settings)"&lt;BR /&gt;&lt;BR /&gt;There is no way to create and use our own keys in hubspot. Nor is it possible to specify the domains on which the key created by hubspot.&lt;BR /&gt;&lt;BR /&gt;How can we do that ?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2025 13:34:13 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Recaptcha-Invalid-domain-for-site-key/m-p/1159615#M82400</guid>
      <dc:creator>DevMca</dc:creator>
      <dc:date>2025-06-02T13:34:13Z</dc:date>
    </item>
  </channel>
</rss>

