Re: User syncing with API

Anonymous
Not applicable

User syncing with API

Hi,
 
We are busy at the moment with using the Marketo API to integrate with our product.
I would like to ask if it is possible to get Marketo user id from web users and then upload the user id's to a list or a segment, without using email, but just by using the user id?
 
I have already read the documentation and the closest thing I could find is this page http://developers.marketo.com/documentation/websites/lead-tracking-munchkin-js/
 
The lead tracking code generates a cookie with an user id, but I could not find a way to be able to use it, apart from executing the associateLead function with an email.
 
Do you know if this is possible and if yes, what would be the way to accomplish this? Please let me know if you need more clarification.
Tags (1)
5 REPLIES 5
SanfordWhiteman
Level 10 - Community Moderator

Re: User syncing with API

You can't read the Marketo Lead ID from client-side Munchkin directly (as you pointed out, you can update the lead but the only key is the email address).  

You would have to do the API lookup from server-to-server, using the cookie value as the key.
Anonymous
Not applicable

Re: User syncing with API

Hi Sanford,

Thank you for having a look at this and providing the answer. Do you know which server-to-server API lookup service I can use where I can provide the cookie value as key? Do you know the url to the documentation?
SanfordWhiteman
Level 10 - Community Moderator

Re: User syncing with API

To add to the list: http://developers.marketo.com/documentation/rest/add-leads-to-list/ To get a lead ID using email address as key: http://developers.marketo.com/documentation/rest/get-multiple-leads-by-filter-type
Anonymous
Not applicable

Re: User syncing with API

Hi Sanford,

Thank you. This is exactly what I needed!
Anonymous
Not applicable

Re: User syncing with API

@Matthijs, just wanted to echo Sanford's comments, and also add that you can query a Marketo lead by their cookie id:
http://developers.marketo.com/blog/get-a-visitors-cookie-id-and-then-query-associated-lead-data/