Get 401 error when using embedded forms on my site

Greetings! I need some help with my problem. I created two embedded forms in Hubspot and put them to my Web Server through the footer on my WordPress panel. All forms are working fine, and leads are going to the Contacts as they should be. But for some reason, I have such an error in the browser console. Now, I`m trying to improve my SEO segment and increase the availability and effectiveness of my site. I am looking for any help to understand why the error below appears and how to fix it. Thanks in advance for the help.

Hi @DVetriak,

Thank you for reaching out to the Community!

It seems you’re getting an authentication error; you can read more about this error type here.

I wanted to ask a couple of subject matter experts for advice:

Hi @Josh, @Anton, @HFisher7, any ideas what could be causing this error? Thank you for your input!

Cheers
Mia, Community Team

No, the error still exists.) The recommendations do not help to resolve it. I am using two embedded forms and not working directly with the API of HubSpot, so I don’t know why the error with authorization is appearing on my site. Below I`ll attach one more screenshot with the error directly from my web page with details from the browser console. I would appreciate any help from your side.)

I’m having the exact same issue. Using the Wordpress plugin and embedded forms in wordpress. The link you sent is for when you’re developing something, however, i’m using out-of-the-box components and also getting loads of these login errors. I’ve been disabling all plugins which might affect this working properly but nothing seems te help.
Secondly, i’ve changed CORS headers to allow everything and still getting this error.

So, there’s no way for me, of that person who started this thread, to change anything on the manner of login. This is done by the Wordpress plugin.

Thanks for commenting @BPolarczyk!

Are you still experiencing the error @DVetriak? Apologies for the delay here!

Something that I’ve found while searching for potential solutions:

If you’re using a localhost URL, the setup within the localhost environment could be blocking the form embed and prevent HubSpot from passing the user token/cookie through the form, which can cause the 401 error. The recommendation in those cases was to use a live domain; the cookie authentication should work without issues then.

If this doesn’t apply in your case, I have another request before I escalate this to our product experts:

Could you try resetting / reconnecting the plugin if you haven’t done that already?

Thank you,

Mia, Community team