Re: Form submission using POST menthod

Amit_Jain
Level 8 - Community Advisor

Form submission using POST menthod

Is it possible to hit an form endpoint to submit the form? I was trying to do that using following URL:

https://xxxx.marketo.com/index.php/leadCapture/save2?formid=1234&munchkinId=xxx-xxx-xxx

but I'm getting error that form is not found? I also checked the documentation and found that it's not allowed to server side positing the data to a form.

pastedImage_1.png

Is there any other way to achieve this?

We are trying to integrate ManyChat.com with marketo and there is an option to post the data to en external system directly like a Marketo webhook. I can use the /lead REST API to creaeteOrUpdate but there will be an issue with the token since it's work just like Marketo webhook.

Thanks in advance for your input on this.

Regards,
Amit

37 REPLIES 37
Amit_Jain
Level 8 - Community Advisor

Re: Form submission using POST menthod

Sanford Whiteman‌ probably you can help me out here.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form submission using POST menthod

You can POST to /save (not /save2).

Use the case-sensitive core fields:

   munchkinId
   formid
   retURL (Thank You URL)
   _mkt_trk (Munchkin cookie)
_mktoReferrer (URL of the page w/form)‍‍‍‍‍

/save is the same endpoint used by <noscript> form posts from Marketo LPs, so it's not really exotic in any way. While you can't open a Support case about it (like other advanced and/or experimental tactics) it's a reliable part of the Marketo ecosystem, up to its rate limit (30 form posts per second minute per IP).

Amit_Jain
Level 8 - Community Advisor

Re: Form submission using POST menthod

Thanks Sanford. I tried but it didn't work either in my case.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form submission using POST menthod

Without seeing your code I can't tell you what's wrong. But it's a basic URL-encoded form POST.

Amit_Jain
Level 8 - Community Advisor

Re: Form submission using POST menthod

I understand that but there is no code involved here. I have an option on UI in ManyChat like we do in Postman to just select "GET" OR "POST" method and put the endpoint URL. Pretty similar to Marketo's webhook UI.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form submission using POST menthod

So if you put a test URL (i.e. your testing server) what is it POSTing?

Set the server to https://2f6eb214.ngrok.io/  temporarily and then run a couple of tests, I'll tell you what it's sending.

Amit_Jain
Level 8 - Community Advisor

Re: Form submission using POST menthod

Thank you Sanford Whiteman‌! But it's working fine now at my end. I'm using following URL:

https://xxx.marketo.com/index.php/leadCapture/save2?formid=36496&formVid=36496&munchkinId=xxx-xxx-xxx&FirstName=Amit&LastName=Jain&Email=amitjain@ntest.com
SanfordWhiteman
Level 10 - Community Moderator

Re: Form submission using POST menthod

That's a GET, not a POST (like Jay said).

Please send a POST to my test endpoint, I'll tell you what it was actually sending.

SanfordWhiteman
Level 10 - Community Moderator

Re: Form submission using POST menthod

OK, I stopped my test server for now as you seem to be busy. But you need to make sure you're using POST. GET support could be discontinued at any time; there's no supported Marketo feature that uses it.