Daily usage limit being reached for API private app calls

Hello.
We are migrating a call from API key to private app. The change seemed very simple:

client = hubspot.Client.create(api_key=['api_key'])

to

client = hubspot.Client.create(access_token=['access_token'])

The updated call seems to be working fine.

However we noticed that with the private API method to get all companies (client.crm.companies.get_all), the number of times the API is being called to read the data is extremely high. It can get to a thousand GET calls per minute - when we need around one hour to read the entire data.
When we were using the API key we had a maximum of a 1000 API calls in the entire hour to read all the data - and it seems that the private API would bring almos 60.000 calls, which is a very high rate, as we want to pull data from other sources as well (contacts, owners, companies) on a daily basis, which is a bad thing considering the 500,000 calls limit per day.
Did anyone find this issue while reading data using private APP? Why is that difference happening in comparison to the API key?

Hi, @SLeal :waving_hand: Was your team able to get any additional insight for this issue? Is it still occurring? Hey, @himanshurauthan @Mike_Eastwood, have you seen anything similar when making the switch to a Private App? I sense that this will likely require more troubleshooting on @SLeal’s end, and I am curious if you have any feedback.

Thank you for taking a look! — Jaycee

Hello Jaycee. There were no news from our team, as we are not familiar enough with the private app configuration to solve this issue. We will keep on having this trouble to migrate from the API key unless we figure out how to limit the number of calls even more while reading the data.

We managed to rewrite the entire code and migrate the API key to access token for all calls and improve the performance. It nows reach the mark of 14.8K call per day, which seems to be acceptable. I am closing the issue.

Hello @SLeal,

As far as I know, this should not happen since in the case of private apps as the endpoint call counts for private apps work the same as that in the case of API key.

Could you please provide us with some insights into what you are working on?

Regards,

Hello!
I will give you more feedback on the details about the number of calls next week - as we are now spending some extra time rewritting the code and validating the changes now with the full migration to the private APP access token.
But giving a quick brief: We are updating (getting and posting) on a daily basis the information of: assignments, calls, companies, contacts, owners and tickets.