API limit and batch user IP update


#1

Hi!

1.- Is there a way to know how many calls has our account done for a day? Since there’s a limit I’d like to know how many I have left.

2.- I need it in order to update the user geolocation, which is currently done with the Form API hs_context attribute. I haven’t found a batch API for Form API, so I think that I can only geolocate users one by one. Is there any alternative? I’d like to run my current code for all my users (as many were incorrectly geolocated).

Thanks!


#2

Hi juanignaciosl,

My name is Hugo, writting from Bilbao, Spain.

For 1.–> I have some C# code for checking the API usage limit. You can do this API Call:

https://api.hubapi.com/integrations/v1/limit/daily?hapikey={YOURHAPIKEY}

and will get:

[{“name”:“api-calls-daily”,“usageLimit”:40000,“currentUsage”:22,“collectedAt”:1495679228626,“fetchStatus”:“NOTFOUND”,“resetsAt”:1495515600000}]

Then you just deserialize that and you can use in your application logic.

Regards,

Hugo.