HubSpot PHP Sample Search Results Iterating App
September 19, 2023 ยท View on GitHub
Currently, this app focuses on demonstrating the functionality of Search the CRM API endpoints and related actions.
Please see the documentation on Creating an app in HubSpot
HubSpot Public API links used in this application
Note on Application Scopes
HubSpot provides a way to restrict application users access to the system to certain scopes. In order to do that it is a good practice to make a set of scopes required by your application. Please refer to Initiate an Integration with OAuth 2.0 for documentation on the scope parameter passed to https://app.hubspot.com/oauth/authorize to make a set of scopes required. Scopes explains how to make optional scopes and talks about scopes available in HubSpot system.
Setup App
Make sure you have Docker Compose installed.
Configure
- Copy .env.template to .env
- Paste your HUBSPOT_CLIENT_ID and HUBSPOT_CLIENT_SECRET
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 -d --build
You should now be able to navigate to http://localhost:8999 and use the application. Firstly you will need to authorize via OAuth there. Than you can to go to the terminal window and start the following command in the application root
docker-compose exec web php /app/src/console/example.php