This package provides a wonderful PHP API client that allows you to interact with GoHighLevel Api
First, install via Composer
composer require musheabdulhakim/gohighlevel-php
🧹 Keep a modern codebase with Pint:
composer lint
✅ Run unit tests using PEST
composer test:unit
🚀 Run the entire test suite:
composer test
use \MusheAbdulHakim\GoHighLevel\GoHighLevel;
//Initialize the client
$client = GoHighLevel::client($access_token, '2021-07-28');
//Or
$clientInit = GoHighLevel::init($access_token)->withVersion('2021-07-28');
// Get User by Location
$user = $client->User()->byLocation($locationId)
//Get locations by stripeId with companyId
$data = $clientInit
->withHttpHeader('channel','OAUTH')
->withHttpHeader('source','INTEGRATION')
->make()->Saas()->get([
'companyId' => '',
'subscriptionId' => '',
'customerId' => ''
]);