PHPackages                             codeinc/cloudrun-auth-http-client - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. codeinc/cloudrun-auth-http-client

AbandonedArchivedLibrary[HTTP &amp; Networking](/categories/http)

codeinc/cloudrun-auth-http-client
=================================

A PSR-7 HTTP client based on Guzzle for services hosted on Google Cloud Platform Cloud Run

v1.4(2y ago)0501MITPHPPHP &gt;=8.2

Since Feb 3Pushed 2y ago1 watchersCompare

[ Source](https://github.com/codeinchq/cloudrun-auth-http-client)[ Packagist](https://packagist.org/packages/codeinc/cloudrun-auth-http-client)[ Docs](https://github.com/codeinchq/cloudrun-auth-http-client)[ RSS](/packages/codeinc-cloudrun-auth-http-client/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (4)Versions (6)Used By (1)

GCP Cloud Run authenticated HTTP client for PHP
===============================================

[](#gcp-cloud-run-authenticated-http-client-for-php)

The PHP 8.2+ library is a [PSR-7](https://www.php-fig.org/psr/psr-7/) HTTP client based on [Guzzle](https://github.com/guzzle/guzzle) and the [official Google Auth PHP package](https://packagist.org/packages/google/auth) for services hosted on [Google Cloud Platform Cloud Run](https://cloud.google.com/run?hl=en).

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

[](#installation)

The recommended way to install the library is through [Composer](http://getcomposer.org):

```
composer require codeinc/cloudrun-auth-http-client
```

Usage
-----

[](#usage)

A GCP service account is required to authenticate the requests sent to a Cloud Run service. If you do not already have a service account, follow instructions on [this page](https://cloud.google.com/iam/docs/service-accounts-create) in order to create one.

Before using the library the service account must be authenticated to send requests to the Cloud Run service following [these steps](https://cloud.google.com/run/docs/authenticating/service-to-service#set-up-sa).

```
use CodeInc\CloudRunAuthHttpClient\HttpClientFactory;

// create a new HttpClientFactory instance
$factory = new HttpClientFactory();

// create the client using a JSON file for the service account key
$httpClient = $factory->factory(
    // Cloud Run service URL
    'https://my-service-12345-uc.a.run.app',
    // path to your service account key
    '/path/to/your/service-account-key.json'
);

// create the client using a key stored in memory
$httpClient = $factory->factory(
    // Cloud Run service URL
    'https://my-service-12345-uc.a.run.app',
    // service account key
    [
        'type' => 'service_account',
        // the rest of the service account key
    ]
);

// create the client using a key stored in a environment variable
$httpClient = $factory->factory(
    // Cloud Run service URL
    'https://my-service-12345-uc.a.run.app',
    // service account key
    json_decode(getenv('SERVICE_ACCOUNT_KEY'), true)
);
```

License
-------

[](#license)

The library is published under the MIT license (see [`LICENSE`](LICENSE) file).

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~4 days

Total

5

Last Release

867d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ce6d7fd91f537008e6af8eef5f5529e994cf74be8d78ee7b9d9ecac476ba1444?d=identicon)[joanfabregat](/maintainers/joanfabregat)

![](https://www.gravatar.com/avatar/8f72f949d7f70e400c02c225685f1934dec6219689f25edec38b4037df166d58?d=identicon)[codeinc](/maintainers/codeinc)

---

Top Contributors

[![joanfabregat](https://avatars.githubusercontent.com/u/4227907?v=4)](https://github.com/joanfabregat "joanfabregat (26 commits)")

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/codeinc-cloudrun-auth-http-client/health.svg)

```
[![Health](https://phpackages.com/badges/codeinc-cloudrun-auth-http-client/health.svg)](https://phpackages.com/packages/codeinc-cloudrun-auth-http-client)
```

###  Alternatives

[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[google/cloud

Google Cloud Client Library

1.2k16.7M57](/packages/google-cloud)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

751291.4k43](/packages/civicrm-civicrm-core)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)

PHPackages © 2026

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