HubSpot-php sample app

This is a sample app for the hubspot-php SDK. Currently, this app focuses on demonstrating the functionality of Contacts API endpoints and their related actions. This app also demonstrates the use of some of Contacts Properties API and Engagements API

Please see the documentation on How do I create an app in HubSpot?

HubSpot Public API links used in this application

Application also demonstrates contacts pagination by saving first 10 pages of contacts into a csv file

Setup App

Make sure you have Docker Compose installed.

Configure

  1. Copy .env.template to .env

  2. Specify authorization data in .env:

    • Paste your HubSpot Private App access token as the value for HUBSPOT_ACCESS_TOKEN

    or

    • Paste HUBSPOT_CLIENT_ID and HUBSPOT_CLIENT_SECRET for OAuth

Running

The best way to run this project (with the least configuration), is using docker compose. Change to the webroot and start it

docker-compose up --build web

You should now be able to navigate to http://localhost:8999 and use the application.

Running tests

Run tests with codecept

docker-compose run codecept run