PHPackages                             ghostzero/bitinflow-accounts - 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. ghostzero/bitinflow-accounts

Abandoned → [bitinflow/accounts](/?search=bitinflow%2Faccounts)Library[API Development](/categories/api)

ghostzero/bitinflow-accounts
============================

PHP bitinflow Accounts API Client for Laravel 5+

3.2.4(2y ago)0498MITPHPPHP ^7.4|^8.0CI failing

Since Aug 31Pushed 2y ago1 watchersCompare

[ Source](https://github.com/bitinflow/accounts)[ Packagist](https://packagist.org/packages/ghostzero/bitinflow-accounts)[ RSS](/packages/ghostzero-bitinflow-accounts/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (8)Versions (15)Used By (0)

bitinflow Accounts
==================

[](#bitinflow-accounts)

[![Total Downloads](https://camo.githubusercontent.com/4ef46283cb7840318dc273d2a6d25f611cf07ba8aeafb02f2e5a7eca7d74e269/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f67686f73747a65726f2f626974696e666c6f772d6163636f756e7473)](https://packagist.org/packages/ghostzero/bitinflow-accounts)[![Latest Stable Version](https://camo.githubusercontent.com/d606add58ac7c9e6f93abb47affb86aeb5cd6ea8838dadb394d882308c8eca33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f67686f73747a65726f2f626974696e666c6f772d6163636f756e7473)](https://packagist.org/packages/ghostzero/bitinflow-accounts)[![License](https://camo.githubusercontent.com/ec0539cc0cf41f77ed0dab4a8545bd83693098c479de808638fab05a055d3e67/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f67686f73747a65726f2f626974696e666c6f772d6163636f756e7473)](https://packagist.org/packages/ghostzero/bitinflow-accounts)[![Discord](https://camo.githubusercontent.com/370a8a274a1404e0d09e92921a2713abeb12f336c315c5e8c662c1d02a578c99/68747470733a2f2f646973636f72646170702e636f6d2f6170692f6775696c64732f3539303934323233333132363234303236312f656d6265642e706e673f7374796c653d736869656c64)](https://ghostzero.dev/discord)

PHP bitinflow Accounts API Client for Laravel 5+

Table of contents
-----------------

[](#table-of-contents)

1. [Installation](#installation)
2. [Event Listener](#event-listener)
3. [Configuration](#configuration)
4. [Examples](#examples)
5. [Documentation](#documentation)
6. [Development](#Development)

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

[](#installation)

```
composer require ghostzero/bitinflow-accounts

```

**If you use Laravel 5.5+ you are already done, otherwise continue.**

Add Service Provider to your `app.php` configuration file:

```
Bitinflow\Accounts\Providers\BitinflowAccountsServiceProvider::class,
```

Event Listener
--------------

[](#event-listener)

- Add `SocialiteProviders\Manager\SocialiteWasCalled` event to your `listen[]` array in `app/Providers/EventServiceProvider`.
- Add your listeners (i.e. the ones from the providers) to the `SocialiteProviders\Manager\SocialiteWasCalled[]` that you just created.
- The listener that you add for this provider is `'GhostZero\\BitinflowAccounts\\Socialite\\BitinflowExtendSocialite@handle',`.
- Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

```
/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'Bitinflow\\Accounts\\Socialite\\BitinflowExtendSocialite@handle',
    ],
];

```

Configuration
-------------

[](#configuration)

Copy configuration to config folder:

```
$ php artisan vendor:publish --provider="Bitinflow\Accounts\Providers\BitinflowAccountsServiceProvider"

```

Add environmental variables to your `.env`

```
BITINFLOW_ACCOUNTS_KEY=
BITINFLOW_ACCOUNTS_SECRET=
BITINFLOW_ACCOUNTS_REDIRECT_URI=http://localhost

```

You will need to add an entry to the services configuration file so that after config files are cached for usage in production environment (Laravel command `artisan config:cache`) all config is still available.

**Add to `config/services.php`:**

```
'bitinflow-accounts' => [
    'client_id' => env('BITINFLOW_ACCOUNTS_KEY'),
    'client_secret' => env('BITINFLOW_ACCOUNTS_SECRET'),
    'redirect' => env('BITINFLOW_ACCOUNTS_REDIRECT_URI')
],
```

Examples
--------

[](#examples)

#### Basic

[](#basic)

```
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();

$bitinflowAccounts->setClientId('abc123');

// Get SSH Key by User ID
$result = $bitinflowAccounts->getSshKeysByUserId(38);

// Check, if the query was successfull
if ( ! $result->success()) {
    die('Ooops: ' . $result->error());
}

// Shift result to get single key data
$sshKey = $result->shift();

echo $sshKey->name;
```

#### Setters

[](#setters)

```
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();

$bitinflowAccounts->setClientId('abc123');
$bitinflowAccounts->setClientSecret('abc456');
$bitinflowAccounts->setToken('abcdef123456');

$bitinflowAccounts = $bitinflowAccounts->withClientId('abc123');
$bitinflowAccounts = $bitinflowAccounts->withClientSecret('abc123');
$bitinflowAccounts = $bitinflowAccounts->withToken('abcdef123456');
```

#### OAuth Tokens

[](#oauth-tokens)

```
$bitinflowAccounts = new Bitinflow\Accounts\BitinflowAccounts();

$bitinflowAccounts->setClientId('abc123');
$bitinflowAccounts->setToken('abcdef123456');

$result = $bitinflowAccounts->getAuthedUser();

$user = $userResult->shift();
```

```
$bitinflowAccounts->setToken('uvwxyz456789');

$result = $bitinflowAccounts->getAuthedUser();
```

```
$result = $bitinflowAccounts->withToken('uvwxyz456789')->getAuthedUser();
```

#### Facade

[](#facade)

```
use Bitinflow\Accounts\Facades\BitinflowAccounts;

BitinflowAccounts::withClientId('abc123')->withToken('abcdef123456')->getAuthedUser();
```

Documentation
-------------

[](#documentation)

### Oauth

[](#oauth)

```
public function retrievingToken(string $grantType, array $attributes)
```

### PaymentIntents

[](#paymentintents)

```
public function getPaymentIntent(string $id)
public function createPaymentIntent(array $parameters)
```

### SshKeys

[](#sshkeys)

```
public function getSshKeysByUserId(int $id)
public function createSshKey(string $publicKey, string $name = NULL)
public function deleteSshKey(int $id)
```

### Users

[](#users)

```
public function getAuthedUser()
public function createUser(array $parameters)
```

[**OAuth Scopes Enums**](https://github.com/ghostzero/bitinflow-accounts/blob/master/src/Enums/Scope.php)

Development
-----------

[](#development)

#### Run Tests

[](#run-tests)

```
composer test
```

```
BASE_URL=xxxx CLIENT_ID=xxxx CLIENT_KEY=yyyy CLIENT_ACCESS_TOKEN=zzzz composer test
```

#### Generate Documentation

[](#generate-documentation)

```
composer docs
```

---

Join the bitinflow Discord!

[![Discord](https://camo.githubusercontent.com/81a93b8bcd41bd1c181a38a471adf769be70313822e5542d29bac055e40aee97/68747470733a2f2f646973636f72646170702e636f6d2f6170692f6775696c64732f3337333436383836343039383333363736382f656d6265642e706e673f7374796c653d62616e6e657232)](https://discord.gg/2ZrCe2h)

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 57.5% 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 ~112 days

Recently: every ~84 days

Total

14

Last Release

986d ago

Major Versions

0.1.0 → 1.0.02019-10-16

1.0.1 → 2.0.02020-07-08

2.0.0 → 3.0.02020-09-08

PHP version history (2 changes)0.0.1PHP &gt;=7.2

3.2.0PHP ^7.4|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/03da561a330aa76d1a09096b2ee0c48ee53ca51d62fa0239469d9615b6855733?d=identicon)[ghostzero](/maintainers/ghostzero)

---

Top Contributors

[![envoyr](https://avatars.githubusercontent.com/u/81368729?v=4)](https://github.com/envoyr "envoyr (50 commits)")[![ghostzero](https://avatars.githubusercontent.com/u/6547306?v=4)](https://github.com/ghostzero "ghostzero (36 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ghostzero-bitinflow-accounts/health.svg)

```
[![Health](https://phpackages.com/badges/ghostzero-bitinflow-accounts/health.svg)](https://phpackages.com/packages/ghostzero-bitinflow-accounts)
```

###  Alternatives

[skagarwal/google-places-api

Google Places Api

1913.0M8](/packages/skagarwal-google-places-api)[romanzipp/laravel-twitch

Twitch PHP Wrapper for Laravel

115121.1k4](/packages/romanzipp-laravel-twitch)[agence104/livekit-server-sdk

Server-side SDK for LiveKit.

79189.9k1](/packages/agence104-livekit-server-sdk)[grantholle/powerschool-api

A Laravel package to make interacting with PowerSchool less painful.

1715.6k1](/packages/grantholle-powerschool-api)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[tamara-solution/php-sdk

Tamara PHP Client Library

10259.4k1](/packages/tamara-solution-php-sdk)

PHPackages © 2026

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