Rest API Errors | Community
Skip to main content
August 26, 2014
Question

Rest API Errors

  • August 26, 2014
  • 6 replies
  • 2080 views
Hey all,

Forgive my layman speak...I'm trying to help out a developer co-worker who's trying to set up an API connect to pass leads to our instance of Marketo from a non-Marketo page/site. Does anyone have thoughts as to why we'd be getting the error on the attached screenshot?

Thanks for the help.
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

6 replies

August 26, 2014
I need a little more info to help here. Is this a screenshot from the JavaScript console? 

I would also recommend taking a look at this help article. It shows you how to do a server-side post: https://community.marketo.com/MarketoResource?id=kA650000000GsXXCA0
August 26, 2014
I believe that this was client-side, and that screenshot was just of the developer tools window in Chrome. I think we'll try the server-side approach. Thanks.
August 27, 2014
You can use a php proxy page to fetch data with javascript as a work around.


October 2, 2014
Try... dataType: 'jsonp'

That got me past that error but now I get this error: Uncaught SyntaxError: Unexpected token :

Any advice?
Yaron_Meiner
Level 2
February 23, 2015
I am having the same issue. I am trying to avoid server activity on ajax calls to marketo which means that i have to pass the gap of the cross origin issue. Is there a way to get the response wrapped for jsonp? 
April 20, 2015
I'm having a similar problem as I'm trying to develop a client-side browser-based REST API interface. The marketo server is on a different domain, so I'm getting the same cross-domain related error as the OP. Does the marketo REST API support any workarounds such as CORS or JSONP?