Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.29 KB

README.md

File metadata and controls

39 lines (24 loc) · 1.29 KB

HubSpot PHP Rate Limit Sample App

Currently, this app focuses on demonstrating the rate limit mechanism. It will be useful for you if you often reach rate limit (429 http error).

Please see the documentation on Creating an app in HubSpot

HubSpot Public API endpoints used in this application

Setup App

Make sure you have Docker Compose installed.

Configure

  1. Copy .env.template to .env

  2. Specify authorization data in .env:

    • 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 -d --build

You should now be able to navigate to http://localhost:8999. 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

Please note this app starts a few workers in order to reach rate limit faster.