coderjerk/hubsnot

Hubspot API v3 Client

Fund package maintenance!
danieldevine

v0.1.3 2023-05-16 09:58 UTC

This package is auto-updated.

Last update: 2023-09-16 11:00:09 UTC


README

PHP client for the Hubspot API v3

Latest Packagist Version Total Downloads

A very simple client because their own one looks unfinished and isn't really usable.

Just solving my own use case for now, which is simply to grab a list of available forms, more to come. Don't use in production unless this is all you want to do too.

$credentials = [
    'hubspot_access_token' => $_ENV['HUBSPOT_ACCESS_TOKEN']
];

$hubsnot = new Hubsnot($credentials);

$forms = $hubsnot->forms()->getForms();

// dd($forms);

foreach ($forms->results as $form) {
    echo nl2br($form->name . "\r\n");
    echo nl2br($form->id . "\r\n");
}