I’m trying to use the API to search contacts using this (where X is the search query and my API key, respectively):
https://api.hubapi.com/contacts/v1/search/query?q=XXXXX&property=email&hapikey=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
When I use this URL in a browser, it returns the result as expected. But run with “curl” in Terminal, I get this error:
{"status":"error","message":"Any of the listed authentication credentials are missing","correlationId":"XXXXXXXX","engagement":{"shhkey-v1":"shhkey-v1 not engaged. Shhkey not found in the request header.","oauth-token":"oauth-token not engaged. OAuth access token not found in request header.","hapikey":"hapikey not engaged. hapikey is not present in query params.","vendorkey-gae":"vendorkey-gae not engaged. Vendorkey not found in request headers.","internal-cookie":"internal-cookie not engaged. Cookie not found in the request.","app-cookie":"app-cookie not engaged. App cookie is not present on the request."},"requestId":"XXXXXXX"}
Note that I’ve obscured the ‘correlationId’ and ‘requestID’ in case they’re exposing anything sensitive.
Any thoughts on how to resolve this? Searching reveals other people who’ve had similar issues but I can’t find a solution.