Skip to content

MusheAbdulHakim/gohighlevel-php-sdk

Repository files navigation

GoHighLevel PHP

GitHub Workflow Status (master) Total Downloads Latest Version License


This package provides a wonderful PHP API client that allows you to interact with GoHighLevel Api

Requires Composer Requires PHP 8.2+

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' => ''
    ]);