Can't issue cURL command on Contacts when count is specified




I am able to authorize the OAUTH connection fine, and also use the cURL command in order to get the defaulted amount of 20 contacts. However, when i append the &count=100 or &count=5, or any type of amount then my cURL does not work within the command line. It is weird because I can get the specified amount of results that I want if I place the URL within a browser where it will show my specified amount of results right in the browser page perfectly. Its only when I issue the exact URL within my command line where the request seems to just hang as it never returns back. Here is my command:

curl -H "Authorization: Bearer xxxx-xxxxx-xxxxx-xxxxxx"

Also just to clarify we have over a thousand records that are within the Hubspot App, but don't know as to why the command hangs only in command line when the amount is specified?

Any help will be appreciated!!! Thanks.


Hi @Bryson_Watabu,

& is used in unix systems to tell the shell to evaluate the previous command int he background. Wrapping the URL in single quotes should do the trick.


Hi Derek,

I got the curl command to work now, however I am experiencing data pulling issues when trying to "Get All Timeline Event Types". Here is the request curl command that I am using:

curl -o json-data/timeline-event-type.json -H "Authorization: Bearer "+bearer

The returned JSON response is:
{"status":"error","message":"UserId not provided in request","correlationId":"5d16b428-e548-4106-bd29-b263d2836a67","requestId":"50ca607669586de229ee94b13d6db44b"}

It is saying that it requires a userId, but according to this developer forum article it says that HubSpot does not currently support getting Event timelines by userId:

How To Get Contact's Timeline Events via API?]

Are there any solutions? Any help will be appreciated.


Hi @Bryson_Watabu,

Are you referring to the 'Get timeline event types' endpoint listed below? That endpoint (and the entire Timeline API) is related to creating/managing custom timeline events. The forum post you linked to appears to be about pulling a contact's entire timeline, which isn't currently possible.