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?
- Create or update a contact
- Get a contact record by its vid
- Get all contacts
- Get All Contacts Properties
- Get List of Owners
- Update a contact property
- Create a contact property
- Search for contacts by email, name, or company name
- Create an Engagement
- Get all engagements
Application also demonstrates contacts pagination by saving first 10 pages of contacts into a csv file
Make sure you have Docker Compose installed.
-
Copy .env.template to .env
-
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
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.
Run tests with codecept
docker-compose run codecept run