SOLVED

API Not Working

Go to solution
Level 2

API Not Working

Hey Everyone,

Running into an issue where we are using a Marketo form and the data is be submitted correctly via the API. However, leads are not populated in Marketo upon submitting the form.

Using the javascript console we can see the API is working as intended (status code: 200) We are not hitting our daily API threshold so I am not sure what can be causing the issue. Any insight is greatly appreciated.

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: API Not Working

OK. Your form is not using the Forms API (it's loading the Marketo Forms 2.0 library but not using it). It's posting to your own proprietary API endpoint on your server, which presumably then uses the REST API to post. The form data is reaching your server, but if there's a problem between your private code and Marketo that isn't something we can possibly see or troubleshoot.

Note this architecture is horrible from a security and scaleability standpoint. I don't think it was adequately thought through.

View solution in original post

11 REPLIES 11
Highlighted
Level 10 - Community Moderator

Re: API Not Working

Question should be moved to Products​, not Marketing Central.

Your haven't provided enough information here, like a link to your form. I hope you aren't calling the REST API directly from the browser (this is an absolute no-no) so clearly there's another layer in-between the form and Marketo.  Or else you meant the Forms API, not REST. Providing more data will get you effective help.

Highlighted
Level 2

Re: API Not Working

Link to form available here

I'm working with a front-end developer on our marketing team and I believe the form API is being used.

I see the following script when viewing the javascript console:

<script src="//app-sj08.marketo.com/js/forms2/js/forms2.min.js"></script>

Let me know if any additional information will be useful

Highlighted
Level 10 - Community Moderator

Re: API Not Working

Please move the thread to Products and I'll answer there.

Highlighted
Level 2

Re: API Not Working

Moved

Highlighted
Level 10 - Community Moderator

Re: API Not Working

OK. Your form is not using the Forms API (it's loading the Marketo Forms 2.0 library but not using it). It's posting to your own proprietary API endpoint on your server, which presumably then uses the REST API to post. The form data is reaching your server, but if there's a problem between your private code and Marketo that isn't something we can possibly see or troubleshoot.

Note this architecture is horrible from a security and scaleability standpoint. I don't think it was adequately thought through.

View solution in original post

Highlighted
Level 2

Re: API Not Working

Thank you,  Sanford.

I will get this over to our front-end team for review.

Highlighted

Re: API Not Working

Hi Joseph,

Are you talking about this page: https://looker.com/demo ​ or this one: Events | Looker ​?

Also, without digging too much, it seems there are quite a few JS errors in your demo page, mostly with Smartforms.

pastedImage_0.png

-Greg

Highlighted
Level 2

Re: API Not Working

Hi Grégoire,

I'm referring to the second URL: Events | Looker

Highlighted

Re: API Not Working

OK, so it's not a Marketo form indeed, so as Sanford explained, you will have to have the REST API called from the server. YOu could also ask your front end team to use the forms 2.0 API form the front end in the background.

Furthermore, you are not capturing the email address, which may be necessary to identify the lead in the DB and deduplicate it through the push REST endpoint or the forms 2.0 API.

-Greg