I'm new to the API and using a modified version of the quickstart app from GitHub. I'm trying to find a contact by his email address and no matter what I try I get:
{"total":0,"results":[]}
I simplified it to search for a literal firstname and still no results. I see other people successfully searching, but all the answers are using curl rather than the library and using the API key rather than OAuth. I have OAuth working to get a token. I also have separately used curl with a v1 endpoint to successfully find a contact. But no luck with Nodejs api library and OAuth.
Thanks RMones, that worked! I gave you an upvote and I'll accept your post as solution.
Any additional info on why I cannot have the other options and why it does not work with all options (I took this straight from the GitHub sample and only modified the filter)?
I'll experiment and see which breaks it, but any tips on what's going on, what combinations work and what doesn't work are very welcome!
Removing from publicObjectSearchRequest only the single line like:
query,
made the error go away, but it did not list the properties I requested, so I'll have to play some more.
FYI, that line was exactly taken from the README.md under "{EXAMPLE} Search Contacts:" at https://github.com/HubSpot/hubspot-api-nodejs so it would be nice to fix that so that example works.