API for Dummies


#1

Hi all,

I've already posted a similar question on the hubspot community forum and did get a single response but unfortunately it's not the sort of thing I can put into a production environment as it's not reliable enough, you can see the question here:

To recap, I need to create an internal landing page that also has a chart for the number of contacts in a static list (the list gets populated via form workflows). So anyway after lots of reading it seems as though the API is the perfect solution and from what I see simply getting a contact list by ID also returns the number of contacts, which at this stage is all I need.

The biggest problem I have now is that I've not touched php in over 2 years and my knowledge of APIs with oAuth is minimal. I looked in the API documentation, created an App and played in the google playground with the details provided to see the results but thats as far as I got.

As far as I can tell to achieve what I want on a Hubspot landing page, I'll need to make a javascript call to an externally hosted php file that can return the results in json. I'm hoping that I've understood that much at least but please let me know if I missed anything or am taking the long way round to achieve this.

Problem is I've no idea how to actually do that php part, can anyone point me to some sample code or supply some sample snippets?

Many thanks in advance,
Simon


#2

Hi @Hotrocksi,

I look forward to hearing what recommendations other community members have; in the meantime, maybe some of these resources might be helpful?