Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty results in client.get_leads by cookie #28

Open
racheldonovan opened this issue Nov 2, 2017 · 2 comments
Open

Empty results in client.get_leads by cookie #28

racheldonovan opened this issue Nov 2, 2017 · 2 comments

Comments

@racheldonovan
Copy link

I'm attempting to find a lead id via the munchkin cookie.

When I use the client in this manner:
response = client.get_leads(:cookie, [cookie])
I get {:requestId=>"xx", :result=>[], :success=>true}

If i make a direct request with the same cookie via HTTParty
HTTParty.get('https://#{id}.mktorest.com/rest/v1/leads.json?filterType=cookie&filterValues=#{cookie}&fields=cookies,email&access_token=#{access_token}')
I also get a successful response but this time including results.

I've used the same initialized client to call get leads by email (client.get_leads(:email, [current_user.profile.email])) and that returns the correct results. Perplexed as to why this would be different or what the issue could be.

@raszi
Copy link
Owner

raszi commented Nov 3, 2017

You are writing Munchkin but that is the JavaScript library of Marketo.

This is a Ruby SDK, how is this related?

@racheldonovan
Copy link
Author

racheldonovan commented Nov 3, 2017

@raszi I am taking the value of the munchkin cookie and doing a search by that cookie, to find the lead id. Search by cookie is a supported filter type in the marketo leads endpoint - see http://developers.marketo.com/rest-api/lead-database/leads/#query

Similar approach to this - http://developers.marketo.com/blog/get-a-visitors-cookie-id-and-then-query-associated-lead-data/

Note that is some of marketos documentation they reference the filterType as cookie and others cookies, I've tried both in this example and get the same empty results - response = client.get_leads(:cookie, [cookie])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants