musheabdulhakim / gohighlevel-php
php sdk for gohighlevel api
Fund package maintenance!
musheabdulhakim
Patreon
paystack.com/pay/musheabdulhakim
Requires
- php: ^8.2|^8.3
- php-http/discovery: ^1.20
- php-http/multipart-stream-builder: ^1.4
- psr/http-client: ^1.0
- psr/http-client-implementation: *
- psr/http-factory-implementation: *
- psr/http-message: ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.65
- guzzlehttp/guzzle: ^7.9
- guzzlehttp/psr7: ^2.7
- pestphp/pest: ^3.5
- pestphp/pest-plugin-type-coverage: ^3.1
- phpstan/phpstan: ^1.12
- rector/rector: ^1.2
- symfony/var-dumper: ^6.4.0|^7.2.0
README
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
Usage
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' => '' ]);