Associate Lead Rest API giving error

Anonymous
Not applicable

Associate Lead Rest API giving error

Hi,
I am using Rest API 'Associate Lead' to merge cookie information with lead as per following document.
http://developers.marketo.com/documentation/rest/associate-lead/
Here is my request:
https://427-BKN-157.mktorest.com/rest/v1/leads/5/associate.json?access_token=9a7f9d99-a25c-4237-a56e-cfe3786a119e:sj&cookie=id:427-BKN-157%26token:_mch-ihomefinder.com-1410454132581-15910
I get following response:
{"requestId":"d7ed#14ba48d0678","success":false,"errors":[{"code":"1003","message":"Cookie value does not look like Marketo cookie "}]}

Any idea why this is happening?
Appreciate any response.


 
Tags (1)
4 REPLIES 4
Anonymous
Not applicable

Re: Associate Lead Rest API giving error

Hi Harshala
 
When I forgot encoding '&' to "%26" in cookie string, my Marketo returned same error.
After I fixed "%26", it worked fine.
But your request is correct, you encode request string twice...?
Anonymous
Not applicable

Re: Associate Lead Rest API giving error

Hi,

the issue comes from the encoding. The correct for '&' is '&'.

Kenny_Elkington
Marketo Employee

Re: Associate Lead Rest API giving error

That's the XML entity.  %26 is correct for URL encoding.

Kenny_Elkington
Marketo Employee

Re: Associate Lead Rest API giving error

I don't see anything out of the ordinary here.  Are you sure you're using a POST?