APIs & Integrations

saar1
Member

Problem with receiving 2+ million contacts with an API call

Hi, I have a portal which holds over 2 million contacts. I’m trying to make an API call that will return all of them (using pagination, of course) but in the middle of the run i get blocked due to limitation or some related issue.

I do not want to download all contact list as a CSV file as my endpoint is already specifically custom-made for the property my customer need.
So please, can I get some help with this? how can Husbspot enables me to do so via an API call?

Tnx for the help,
Saar

0 Upvotes
4 Replies 4
Dadams
HubSpot Employee
HubSpot Employee

Problem with receiving 2+ million contacts with an API call

Hi @saar1

There should not be any type of limitation that would prevent you from getting contacts over a certain number. Are you getting any type of error for this? And if you are, do you have any details for that error?

0 Upvotes
saar1
Member

Problem with receiving 2+ million contacts with an API call

Hi @dadams tnx for getting back to me.
I do get a 500 error. Here’s some information about the error:
2016-11-30 09:48:05,063 ERROR org.apache.hadoop.security.UserGroupInformation: PriviledgedActionException as:u_2457 cause:java.io.IOException: Calling url ‘https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=<Access_Token>&property=ClientName&property=Total_Triple_Dip&property=hs_email_delivered&property=hs_email_optout&property=hs_email_open&property=hs_email_click&property=twitterhandle&property=How_did_you_hear_about_the_LMT_Deals_app_&property=follower_Count&property=during_the_booking_process_did_you_require_customer_service_support_&property=How_did_you_hear_about_last_minute_travel_&property=what_can_we_do_to_improve_our_website_&property=anything_else_you_would_like_us_to_know_&property=please_specify&property=please_rate_us_on_the_app_store&property=how_helpful_was_our_customer_service_representative_&property=lastname&property=firstname&count=100&vidOffset=354667’ failed with response - {headers={content-type=application/json; charset=UTF-8, connection=keep-alive, access-control-allow-credentials=false, date=Wed, 30 Nov 2016 09:47:52 GMT, vary=Accept-Encoding}, body={“status”:“error”,“message”:“internal error”,“correlationId”:“a7695ca6-f7d7-4f5c-a175-128c620b4f46”,“requestId”:“14e138e1-3fb8-44b3-a6b5-f613e554e03c”}, status=500}
… java.io.IOException: Calling url ‘https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=<Access_Token>&property=ClientName&property=Total_Triple_Dip&property=hs_email_delivered&property=hs_email_optout&property=hs_email_open&property=hs_email_click&property=twitterhandle&property=How_did_you_hear_about_the_LMT_Deals_app_&property=follower_Count&property=during_the_booking_process_did_you_require_customer_service_support_&property=How_did_you_hear_about_last_minute_travel_&property=what_can_we_do_to_improve_our_website_&property=anything_else_you_would_like_us_to_know_&property=please_specify&property=please_rate_us_on_the_app_store&property=how_helpful_was_our_customer_service_representative_&property=lastname&property=firstname&count=100&vidOffset=354667’ failed with response - {headers={content-type=application/json; charset=UTF-8, connection=keep-alive, access-control-allow-credentials=false, date=Wed, 30 Nov 2016 09:47:52 GMT, vary=Accept-Encoding}, body={“status”:“error”,“message”:“internal error”,“correlationId”:“a7695ca6-f7d7-4f5c-a175-128c620b4f46”,“requestId”:“14e138e1-3fb8-44b3-a6b5-f613e554e03c”}, status=500}

I think this is the important line:
body={“status”:“error”,“message”:“internal error”,“correlationId”:“a7695ca6-f7d7-4f5c-a175-128c620b4f46”,“requestId”:“14e138e1-3fb8-44b3-a6b5-f613e554e03c”}, status=500}
12:18 pm

0 Upvotes
saar1
Member

Problem with receiving 2+ million contacts with an API call

@dadams I’ve hidden the actual access token, is there anyway i can send it to you privately so you can reproduce?

0 Upvotes
Dadams
HubSpot Employee
HubSpot Employee

Problem with receiving 2+ million contacts with an API call

I’ll messge you directly