20114 - Bad parameter when setting marketoCookie | Community
Skip to main content
September 17, 2013
Question

20114 - Bad parameter when setting marketoCookie

  • September 17, 2013
  • 4 replies
  • 1175 views
I'm using C# and code from the Marketo C# Example to try and sync leads.  Everything is working fine as long as I don't set the marketoCookie property of my ParamsSyncLead variable:

ws_lead.marketoCookie = cookie;

cookie is the value of the marketo cookie, it looks like this "id:MYID,token:_mch-localhost-1375359337265-73080".

Changed id to MYID, but it is a valid ID.  As soon as I call syncLead with this line of code in place I get the 20114 - Bad parameter error being thrown.  If I comment out that line, everything works.  From the API doc this seems like it should work
"syncLead
This function requests an insert or update (upsert) operation for a lead record. When updating an existing lead, the 
lead can be identified one of the follow:
Marketo ID
Foreign system ID
Marketo Cookie
Email"

Our requirement is for the marketo cookie to be the unique identifier, not the other 3.  

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

4 replies

September 17, 2013
Of course, shortly after posting this I finally figured it out.  Was getting the cookie value by calling

Request.Cookies["_mkto_trk"].Values[0].ToString()

which was changing the & to a comma, and crashing the API call.  Changed to

Request.Cookies["_mkto_trk"].Value

and it started working.
September 23, 2013
Good catch Scott.  Thanks for sharing the resolution.
March 20, 2014
Scot maybe you can help me.

I am also using c# and trying to request campaign.

I get a bad paramter 20114  error.

What does that actually mean?
October 22, 2014
Thanks for sharing your solution Scott.

IIan, I'm getting the same error on my requestCampaign call.  Were you able to resolve it?