<?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: How do I resolve a 403 forbidden error in HubSpot form.create? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215650#M85077</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1004468"&gt;@JeetuDubey&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be the case that you are using the "new" HubSpot forms and the code examples might have been used for the "Legacy" forms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are not using "legacy" forms, then take a look at the documentation for using JS with new forms here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api-reference/global-form-events/guide" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/global-form-events/guide&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Oct 2025 15:15:47 GMT</pubDate>
    <dc:creator>evaldas</dc:creator>
    <dc:date>2025-10-23T15:15:47Z</dc:date>
    <item>
      <title>How do I resolve a 403 forbidden error in HubSpot form.create?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215095#M85054</link>
      <description>&lt;P&gt;When I using form.create method, The form is loaded but my custom JS code is not working as expected. I can only see 403 forbidden error in my console.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code assiciated with functions are not triggering .&lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;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SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;function&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;$form&lt;/SPAN&gt;&lt;SPAN&gt;) {&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;alert&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Form is submitted'&lt;/SPAN&gt;&lt;SPAN&gt;);&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;});&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Thu, 23 Oct 2025 08:28:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215095#M85054</guid>
      <dc:creator>JeetuDubey</dc:creator>
      <dc:date>2025-10-23T08:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I resolve a 403 forbidden error in HubSpot form.create?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215436#M85072</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1004468"&gt;@JeetuDubey&lt;/a&gt;&amp;nbsp;and welcome, we are delighted to have you here!&lt;BR /&gt;&lt;BR /&gt;Thanks for reaching out to the HubSpot Community!&lt;BR /&gt;&lt;BR /&gt;- What is the exact URL where the form is embedded?&lt;BR /&gt;- Is your script directly on the page, included via a tag manager, or via another third-party script?&lt;BR /&gt;&lt;BR /&gt;The more info, screenshots (without sensitive/confidential information), and details you can provide, the better the Community can assist.&lt;BR /&gt;&lt;BR /&gt;I've found for you the solution from&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/183502"&gt;@JohnSmith2314&lt;/a&gt;&amp;nbsp;on this similar post "&lt;A href="https://community.hubspot.com/t5/APIs-Integrations/populating-Hubspot-Hidden-field-and-403-error/m-p/1187092" target="_blank" rel="noopener"&gt;populating Hubspot Hidden field and 403 error&lt;/A&gt;" that might help you.&lt;BR /&gt;&lt;BR /&gt;Now, let's consult our Top Experts: Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/577159"&gt;@GiantFocal&lt;/a&gt;,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92197"&gt;@albertsg&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/17186"&gt;@Anton&lt;/a&gt;&amp;nbsp;do you have any insights to share with &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1004468"&gt;@JeetuDubey&lt;/a&gt;, please?&lt;BR /&gt;&lt;BR /&gt;Have a brilliant day and thanks so much!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":red_heart:"&gt;❤️&lt;/span&gt;&lt;BR /&gt;Bérangère&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 08:36:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215436#M85072</guid>
      <dc:creator>BérangèreL</dc:creator>
      <dc:date>2025-10-23T08:36:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I resolve a 403 forbidden error in HubSpot form.create?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215650#M85077</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/1004468"&gt;@JeetuDubey&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It might be the case that you are using the "new" HubSpot forms and the code examples might have been used for the "Legacy" forms.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are not using "legacy" forms, then take a look at the documentation for using JS with new forms here:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://developers.hubspot.com/docs/api-reference/global-form-events/guide" target="_blank"&gt;https://developers.hubspot.com/docs/api-reference/global-form-events/guide&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2025 15:15:47 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-do-I-resolve-a-403-forbidden-error-in-HubSpot-form-create/m-p/1215650#M85077</guid>
      <dc:creator>evaldas</dc:creator>
      <dc:date>2025-10-23T15:15:47Z</dc:date>
    </item>
  </channel>
</rss>

