API Not Working | Community
Skip to main content
Joseph_Long
New Participant
January 4, 2017
Solved

API Not Working

  • January 4, 2017
  • 2 replies
  • 5730 views

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.

Best answer by SanfordWhiteman

Moved


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.

2 replies

Nicholas_Manojl
New Participant
January 5, 2017

The status code only refers to the fact that the endpoint is valid, not whether a success has been reached.

In other words, a failed API call still returns a 200 response.

SanfordWhiteman
New Participant
January 4, 2017

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.

Joseph_Long
New Participant
January 4, 2017

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

SanfordWhiteman
New Participant
January 4, 2017

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