PHP code example of musheabdulhakim / gohighlevel-php

1. Go to this page and download the library: Download musheabdulhakim/gohighlevel-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

musheabdulhakim / gohighlevel-php example snippets


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


bash
composer