PHPackages                             compwright/oauth2-housecallpro - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. compwright/oauth2-housecallpro

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

compwright/oauth2-housecallpro
==============================

Housecall Pro OAuth 2.0 Client Provider for The PHP League OAuth2-Client

v3.0.1(9mo ago)19.4k—8.3%MITPHPPHP ^8.3CI passing

Since Sep 1Pushed 9mo agoCompare

[ Source](https://github.com/compwright/oauth2-housecallpro)[ Packagist](https://packagist.org/packages/compwright/oauth2-housecallpro)[ GitHub Sponsors](https://github.com/compwright)[ RSS](/packages/compwright-oauth2-housecallpro/feed)WikiDiscussions master Synced 1mo ago

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

Housecall Pro Provider for OAuth 2.0 Client
===========================================

[](#housecall-pro-provider-for-oauth-20-client)

[![Latest Version](https://camo.githubusercontent.com/6bcb63ebb0e44d39cc0644bdd5db818194ad7fad2459c78626afbde08dfd0934/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636f6d707772696768742f6f61757468322d686f75736563616c6c70726f2e7376673f7374796c653d666c61742d737175617265)](https://github.com/compwright/oauth2-housecallpro/releases)[![Total Downloads](https://camo.githubusercontent.com/37e8a36a1ef49efe8eaee646fdab9098cd9d3a180c7f9419242008baf2e60173/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636f6d707772696768742f6f61757468322d686f75736563616c6c70726f2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/compwright/oauth2-housecallpro)

This package provides Housecall Pro OAuth 2.0 support for the PHP League's [OAuth 2.0 Client](https://github.com/thephpleague/oauth2-client).

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

[](#installation)

To install, use composer:

```
composer require compwright/oauth2-housecallpro league/oauth2-client

```

Usage
-----

[](#usage)

Usage is the same as The League's OAuth client, using `\CompWright\OAuth2\HousecallPro\HousecallproProvider` as the provider.

### Example: Authorization Code Flow

[](#example-authorization-code-flow)

```
$factory = new CompWright\OAuth2\HousecallPro\HousecallproProviderFactory();

$provider = $factory->new(
    clientId: '{housecallpro-client-id}',
    clientSecret: '{housecallpro-client-secret}',
    redirectUri: '{housecallpro-app-redirect-uri}',
);

if (!isset($_GET['code'])) {
    // If we don't have an authorization code then get one
    $authUrl = $provider->getAuthorizationUrl();
    $_SESSION['oauth2state'] = $provider->getState();
    header('Location: ' . $authUrl);
    exit;
}

// Check given state against previously stored one to mitigate CSRF attack
if (empty($_GET['state']) || ($_GET['state'] !== $_SESSION['oauth2state'])) {
    unset($_SESSION['oauth2state']);
    exit('Invalid state');
}

// Get an access token using the authorization code grant
$token = $provider->getAccessToken('authorization_code', [
    'code' => $_GET['code']
]);

// You can look up a users profile data
$user = $provider->getResourceOwner($token);
printf('Hello %s!', $user->getId());

// Use the token to interact with an API on the users behalf
echo $token->getToken();
```

Testing
-------

[](#testing)

```
$ make test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](https://github.com/compwright/oauth2-housecallpro/blob/master/CONTRIBUTING.md) for details.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/compwright/oauth2-housecallpro/blob/master/LICENSE) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance55

Moderate activity, may be stable

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 81.8% 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 ~357 days

Recently: every ~379 days

Total

6

Last Release

298d ago

Major Versions

1.0.0 → 2.0.02021-05-27

2.1.1 → v3.0.02025-07-23

PHP version history (4 changes)1.0.0PHP ^7.0

2.0.0PHP ^7.0 || ^8.0

2.1.0PHP ^7.3 || ^8.0

v3.0.0PHP ^8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/138688?v=4)[Jonathon Hill](/maintainers/compwright)[@compwright](https://github.com/compwright)

---

Top Contributors

[![compwright](https://avatars.githubusercontent.com/u/138688?v=4)](https://github.com/compwright "compwright (9 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

clientprovideroauthoauth2authorizationauthorisationhousecallpro

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/compwright-oauth2-housecallpro/health.svg)

```
[![Health](https://phpackages.com/badges/compwright-oauth2-housecallpro/health.svg)](https://phpackages.com/packages/compwright-oauth2-housecallpro)
```

###  Alternatives

[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[mollie/oauth2-mollie-php

Mollie Provider for OAuth 2.0 Client

251.7M1](/packages/mollie-oauth2-mollie-php)[omines/oauth2-gitlab

GitLab OAuth 2.0 Client Provider for The PHP League OAuth2-Client

36721.5k13](/packages/omines-oauth2-gitlab)

PHPackages © 2026

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