PHPackages                             musheabdulhakim/gohighlevel-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. musheabdulhakim/gohighlevel-php

ActiveLibrary[API Development](/categories/api)

musheabdulhakim/gohighlevel-php
===============================

php sdk for gohighlevel api

1.0.6(11mo ago)151.1k12[1 issues](https://github.com/MusheAbdulHakim/gohighlevel-php-sdk/issues)[1 PRs](https://github.com/MusheAbdulHakim/gohighlevel-php-sdk/pulls)MITPHPPHP ^8.2|^8.3|^8.4CI passing

Since Jun 9Pushed 5mo ago4 watchersCompare

[ Source](https://github.com/MusheAbdulHakim/gohighlevel-php-sdk)[ Packagist](https://packagist.org/packages/musheabdulhakim/gohighlevel-php)[ Fund](https://paystack.com/pay/musheabdulhakim)[ GitHub Sponsors](https://github.com/musheabdulhakim)[ RSS](/packages/musheabdulhakim-gohighlevel-php/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (15)Versions (9)Used By (0)

[![GoHighLevel PHP](art/sdk-art.jpg)](art/sdk-art.jpg) [![GitHub Workflow Status (master)](https://github.com/MusheAbdulHakim/gohighlevel-php-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/MusheAbdulHakim/gohighlevel-php-sdk/actions) [![Total Downloads](https://camo.githubusercontent.com/5d81db8ef769f97dbf2d0704ffce842f9bff1aa0f678b8bf656f62c5062d70df/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d75736865616264756c68616b696d2f676f686967686c6576656c2d706870)](https://packagist.org/packages/musheabdulhakim/gohighlevel-php) [![Latest Version](https://camo.githubusercontent.com/71d0cc7922e5822334c7d3bf9ebc9d04aa6add44353304e1661ad469c7f864bb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d75736865616264756c68616b696d2f676f686967686c6576656c2d706870)](https://packagist.org/packages/musheabdulhakim/gohighlevel-php) [![License](https://camo.githubusercontent.com/8c504f5b2f208e13ebee3ffba19e297f916b09b982caddb447c8a486e598211a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6d75736865616264756c68616b696d2f676f686967686c6576656c2d706870)](https://packagist.org/packages/musheabdulhakim/gohighlevel-php)

---

GoHighLevel PHP SDK
===================

[](#gohighlevel-php-sdk)

This package provides a wonderful **PHP API** client that allows you to interact with [GoHighLevel Api](https://highlevel.stoplight.io/docs/integrations/0443d7d1a4bd0-overview/). It's built to simplify your interactions with the platform. This SDK provides a robust, type-safe, and easy-to-use interface for all major API endpoints, from managing businesses and contacts to handling payments and workflows.

Features ✨
----------

[](#features-)

- **100% PSR-compatible**: The SDK adheres to PSR standards, including PSR-18 for HTTP clients, making it compatible with any modern PHP framework.
- **Type-Safe &amp; Predictable**: Written in PHP 8.1 with `strict_types`, the code is reliable and predictable.
- **Powerful Factory**: The `Factory` class gives you full control over the client's configuration, allowing you to set custom headers, API versions, and HTTP clients.
- **Comprehensive Resource Coverage**: Access all major GoHighLevel API resources through dedicated, logical methods (e.g., `->contacts()`, `->businesses()`, `->workflows()`).

Installation
------------

[](#installation)

You can install the SDK via Composer.

```
composer require musheabdulhakim/gohighlevel-php-sdk
```

Quick Start
-----------

[](#quick-start)

The easiest way to get started is to use the `GoHighLevel::client()` method. It handles the client configuration for you.

```
use MusheAbdulHakim\GoHighLevel\GoHighLevel;

// Initialize the client with your API key
$client = GoHighLevel::client('ACCESS_TOKEN');

// Example: Get a business by its ID
$businessId = 'your_business_id_here';
$businessData = $client->businesses()->get($businessId);

print_r($businessData);
```

Advanced Usage with the Factory
-------------------------------

[](#advanced-usage-with-the-factory)

For more control over the client's configuration, use the `GoHighLevel::factory()` method. This is useful for setting a specific API version, a custom base URI, or integrating with a specific HTTP client like Guzzle.

```
use MusheAbdulHakim\GoHighLevel\GoHighLevel;
use GuzzleHttp\Client as GuzzleClient;

$client = GoHighLevel::factory()
    ->withApiKey('YOUR_API_KEY')
    // Set a custom base URI (optional)
    ->withBaseUri('https://custom-api-endpoint.com')
    // Set the API Version (optional)
    ->withVersion('2024-05-15')
    // Use a custom PSR-18 HTTP client (optional)
    ->withHttpClient(new GuzzleClient())
    ->make();

// Now you can use the fully configured client
$contacts = $client->contacts()->all();
```

---

API Resources
-------------

[](#api-resources)

The SDK provides a simple, object-oriented interface for accessing different GoHighLevel resources. Each resource is accessed via a dedicated method on the `Client` object.

MethodResource ClassDescription`->businesses()``MusheAbdulHakim\GoHighLevel\Resources\Business`Manage businesses.`->calendars()``MusheAbdulHakim\GoHighLevel\Resources\Calendars\Calendar`Manage calendars and events.`->campaigns()``MusheAbdulHakim\GoHighLevel\Resources\Campaigns\Campaign`Manage campaigns and marketing automation.`->companies()``MusheAbdulHakim\GoHighLevel\Resources\Company`Manage companies.`->contacts()``MusheAbdulHakim\GoHighLevel\Resources\Contacts\Contact`Manage and retrieve contact information.`->conversations()``MusheAbdulHakim\GoHighLevel\Resources\Conversations\Conversation`Access and manage conversations.`->courses()``MusheAbdulHakim\GoHighLevel\Resources\Courses\Course`Manage courses.`->forms()``MusheAbdulHakim\GoHighLevel\Resources\Forms\Form`Work with forms.`->invoices()``MusheAbdulHakim\GoHighLevel\Resources\Invoices\Invoice`Manage and create invoices.`->triggerLinks()``MusheAbdulHakim\GoHighLevel\Resources\TriggerLinks\TriggerLink`Work with trigger links.`->location()``MusheAbdulHakim\GoHighLevel\Resources\Locations\Location`Manage locations.`->mediaLibrary()``MusheAbdulHakim\GoHighLevel\Resources\MediaLibrary\MediaLibrary`Manage media assets.`->funnel()``MusheAbdulHakim\GoHighLevel\Resources\Funnels\Funnel`Manage sales funnels.`->opportunity()``MusheAbdulHakim\GoHighLevel\Resources\Opportunities\Opportunity`Manage sales opportunities.`->payments()``MusheAbdulHakim\GoHighLevel\Resources\Payments\Payment`Manage payments.`->products()``MusheAbdulHakim\GoHighLevel\Resources\Products\Product`Manage products.`->saas()``MusheAbdulHakim\GoHighLevel\Resources\SaaS\Saas`Manage SaaS-related functionality.`->snapshot()``MusheAbdulHakim\GoHighLevel\Resources\Snapshots\Snapshot`Work with account snapshots.`->survey()``MusheAbdulHakim\GoHighLevel\Resources\Surveys\Survey`Manage surveys.`->user()``MusheAbdulHakim\GoHighLevel\Resources\Users\User`Manage users.`->workflow()``MusheAbdulHakim\GoHighLevel\Resources\Workflows\Workflow`Work with workflows.`->oAuth()``MusheAbdulHakim\GoHighLevel\Resources\Auth\OAuth`Handle OAuth 2.0 authentication.---

OAuth 2.0 Integration
---------------------

[](#oauth-20-integration)

The SDK includes a helper method to simplify the OAuth 2.0 authentication flow, which is necessary for certain API scopes.

### Getting an Access Token

[](#getting-an-access-token)

You can use the static `getAccessToken` method to exchange an authorization code for an access token.

```
use MusheAbdulHakim\GoHighLevel\GoHighLevel;

$params = [
    'grant_type' => 'authorization_code',
    'client_id' => 'YOUR_CLIENT_ID',
    'client_secret' => 'YOUR_CLIENT_SECRET',
    'redirect_uri' => 'YOUR_REDIRECT_URI',
    'code' => 'THE_AUTH_CODE_FROM_GOHIGHLEVEL',
];

$accessTokenResponse = GoHighLevel::getAccessToken(
    'https://services.leadconnectorhq.com/oauth/token',
    'application/x-www-form-urlencoded',
    $params
);

print_r($accessTokenResponse);
```

---

### [Visit The Documentation](https://musheabdulhakim.github.io/gohighlevel-php-sdk)

[](#visit-the-documentation)

---

Contribution Guide
==================

[](#contribution-guide)

Thank you for considering contributing to the **GoHighLevel PHP SDK**! We welcome all contributions, from bug fixes and new feature implementations to documentation improvements. By following these guidelines, you can help us maintain code quality and a smooth development process.

Getting Started
---------------

[](#getting-started)

### 1. Fork the Repository

[](#1-fork-the-repository)

First, fork the `musheabdulhakim/gohighlevel-php` repository on GitHub and clone your fork to your local machine.

```
git clone https://github.com/MusheAbdulHakim/gohighlevel-php-sdk.git

cd gohighlevel-php
```

### 2. Install Dependencies

[](#2-install-dependencies)

```
composer install
```

Development Workflow
--------------------

[](#development-workflow)

### 1. Create a New Branch

[](#1-create-a-new-branch)

Before you start working, create a new branch for your feature or bug fix. Use a descriptive name that reflects your changes.

```
git checkout -b feature/your-awesome-feature
```

### 2. Write Your Code

[](#2-write-your-code)

Follow the existing coding style and project structure. The SDK uses `strict_types=1` and is built on a PSR-18 compliant HTTP client system.

When adding a new feature or fixing a bug, remember to write **unit tests**. All new code must be covered by tests to ensure it works as expected and prevents regressions. Your tests should be written using [PestPHP](https://pestphp.com/).

### 3. Run the Test Suite

[](#3-run-the-test-suite)

Before committing your changes, you must ensure that all tests pass and the code meets the project's quality standards. You can run the entire test suite with a single command:

```
composer test
```

This command executes all quality checks in a specific order:

- `@test:lint`: Checks for and automatically fixes coding style issues using **PHP-CS-Fixer**.
- `@test:refacto`: Runs **Rector** to find potential code improvements.
- `@test:types`: Performs static analysis with **PHPStan** to catch type-related errors.
- `@test:unit`: Executes all unit tests with **PestPHP**.

### 4. Fix Linting and Style Errors

[](#4-fix-linting-and-style-errors)

The project uses `php-cs-fixer` to enforce a consistent coding style. You can automatically fix most issues by running:

```
composer lint
```

To see what changes would be made without applying them, use the dry run command:

```
composer test:lint
```

### 5. Submit a Pull Request

[](#5-submit-a-pull-request)

Once your code is complete, tested, and all checks pass, commit your changes and push your branch to your forked repository.

```
git add .
git commit -m "feat: Add a new feature for managing workflows"
git push origin feature/your-awesome-feature
```

Finally, open a pull request from your branch to the `master` branch of the original repository. Provide a clear and concise description of your changes, and reference any relevant issues.

Thank you again for your contribution! We will review your pull request as soon as possible.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance62

Regular maintenance activity

Popularity31

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 98.7% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~61 days

Recently: every ~73 days

Total

7

Last Release

331d ago

PHP version history (3 changes)1.0.0PHP ^8.2.0

1.0.3PHP ^8.2|^8.3

1.0.4PHP ^8.2|^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/45583971540c90528204f4380926ed2e370ac89612aa194f71e4073abfdb78d0?d=identicon)[musheabdulhakim](/maintainers/musheabdulhakim)

---

Top Contributors

[![MusheAbdulHakim](https://avatars.githubusercontent.com/u/58814410?v=4)](https://github.com/MusheAbdulHakim "MusheAbdulHakim (155 commits)")[![marketingmavens](https://avatars.githubusercontent.com/u/583824?v=4)](https://github.com/marketingmavens "marketingmavens (2 commits)")

---

Tags

ghlgohighlevelphpsdkphpapisdkpackagegohighlevelghlgohighlevel-sdk

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/musheabdulhakim-gohighlevel-php/health.svg)

```
[![Health](https://phpackages.com/badges/musheabdulhakim-gohighlevel-php/health.svg)](https://phpackages.com/packages/musheabdulhakim-gohighlevel-php)
```

###  Alternatives

[openai-php/client

OpenAI PHP is a supercharged PHP API client that allows you to interact with the Open AI API

5.8k22.6M232](/packages/openai-php-client)[mozex/anthropic-php

Anthropic PHP is a supercharged community-maintained PHP API client that allows you to interact with Anthropic API.

46365.1k13](/packages/mozex-anthropic-php)[getbrevo/brevo-php

Official Brevo provided RESTFul API V3 php library

963.1M35](/packages/getbrevo-brevo-php)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[deeplcom/deepl-php

Official DeepL API Client Library

2616.2M66](/packages/deeplcom-deepl-php)[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
