PHPackages                             mainstreamct/pettenvolk-api - 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. mainstreamct/pettenvolk-api

AbandonedArchivedLibrary[API Development](/categories/api)

mainstreamct/pettenvolk-api
===========================

The official Laravel integration for the Pettenvolk API.

v1.0.2(8y ago)012AGPL-3.0-or-laterPHP

Since Apr 4Pushed 5y ago3 watchersCompare

[ Source](https://github.com/MainstreamCT/Pettenvolk-API-Laravel)[ Packagist](https://packagist.org/packages/mainstreamct/pettenvolk-api)[ RSS](/packages/mainstreamct-pettenvolk-api/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

Pettenvolk API for Laravel
==========================

[](#pettenvolk-api-for-laravel)

### Depreciation notice: the Pettenvolk API is moving to Laravel Passport authentication. For authenticating your users using their Pettenvolk account, refer to the Passport documentation. A complete overview of API endpoints for PettenvolkAPIv2.0 is now available at .

[](#depreciation-notice-the-pettenvolk-api-is-moving-to-laravel-passport-authentication-for-authenticating-your-users-using-their-pettenvolk-account-refer-to-the-passport-documentation-a-complete-overview-of-api-endpoints-for-pettenvolkapiv20-is-now-available-at-httpspettenvolkcomdeveloperpettenvolk-api)

Recommended tools to complete this integration:
☕🎶💻⏰

This is the official package to integrate the Pettenvolk API (a.k.a. Chameleon) with your Laravel application. API keys can be acquired using the Pettenvolk Developer Tools at  (currently only available to invited testers). Docs for this API can be found at .

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

[](#table-of-contents)

1. [Installation](#installation)

    1. [Using Composer](#using-composer)
2. [Configuration](#configuration)
3. [Usage](#usage)

    1. [Authentication](#authentication)
    2. [Fetching users](#fetching-users)
4. [Bugs](#bugs)
5. [Some final notes](#some-final-notes)

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

[](#installation)

### Using Composer

[](#using-composer)

First of all, install the package. Y'all know the drill, but as a reminder:
`composer require mainstreamct/pettenvolk-api`

After installing, edit your config/app.php:

```
   // Providers array:
   mainstreamct\PettenvolkApi\PettenvolkApiServiceProvider::class,

   // Aliases array:
   'Pettenvolk' => mainstreamct\PettenvolkApi\Pettenvolk::class,
```

...and execute the following command:
`php artisan vendor:publish`

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

[](#configuration)

1. Get your API key at
2. Create `PETTENVOLK_API_KEY` in your .env file and store the API key in it

Usage
-----

[](#usage)

### Authentication

[](#authentication)

Before you can authenticate users using the Pettenvolk API, you must add two lines to your create\_users\_table migration (or add the corresponding columns to your Users table):

```
  $table->string('pettenvolk_uid')->nullable();
  $table->string('pettenvolk_api_token')->nullable();
```

Note that this API token is reset at login and is required to perform any other interaction with the API, so store it carefully.

Authenticating users with Pettenvolk Passport is a breeze. For authentication using only Pettenvolk Passport, you could do something like this:

```
// Start function
public function authenticateWithPettenvolk($request Request) {
   // Search API for user
   $pettenvolk = new Pettenvolk;
   $auth = $pettenvolk->auth($request->email, $request->password);

   // Search own DB for user
   $user = User::where('pettenvolk_uid', $auth->id)->first();

   // If no user is found, create user
   if(!$user) {
      $create = new User;
      $create->email = $auth->email;
      $create->password = $auth->password;
      $create->pettenvolk_uid = $auth->id;
      $create->pettenvolk_api_token =$auth->api_token;
      // Your user code ...
      $create->save();
   }

   // Update the user's API token
   $user->update(['pettenvolk_api_token' => $auth->api_token]);

   // Authenticate the user
   Auth::loginUsingId($user->id);

   // Perform your redirects and/or other authentication functions
}
```

### Fetching users

[](#fetching-users)

Getting a user's details from the API is easy:

```
  Pettenvolk::user('user_id_goes_here');
```

This returns a user's `name`, `avatar`, `color`, `bg` (background image), `type`, `verified` (boolean), `email`, and `username`. Please note that in order to perform this request, a user needs to be logged in and have an API token. This token can optionally be passed by including an `api_token` parameter (it's taken from the Auth facade by default).

Bugs
----

[](#bugs)

Found a bug? Message us at  or fill out the bug report form in your Pettenvolk Tester Environment.

Some final notes
----------------

[](#some-final-notes)

This API is constantly monitored and implementations are often checked on compliance to the API terms. We store every request made to this API, together with some additional details like returned status codes, in order to ensure the best possible experience when using our API service.

Want to know how to fully comply to the API terms? Read  for more information.

Copyright © 2018 MainstreamCT
This package is published under the GNU AGPLv3 license. Additional API terms apply.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 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 ~0 days

Total

3

Last Release

3008d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5104d3b090447f16e8f3bb356823286c1bf67cec55d4be4c7217f7cfd26490b6?d=identicon)[mainstreamct](/maintainers/mainstreamct)

---

Top Contributors

[![layetri](https://avatars.githubusercontent.com/u/8854301?v=4)](https://github.com/layetri "layetri (25 commits)")

---

Tags

laravellaravel-5-packagepettenvolk

### Embed Badge

![Health badge](/badges/mainstreamct-pettenvolk-api/health.svg)

```
[![Health](https://phpackages.com/badges/mainstreamct-pettenvolk-api/health.svg)](https://phpackages.com/packages/mainstreamct-pettenvolk-api)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k496.1k33](/packages/neuron-core-neuron-ai)[avalara/avataxclient

Client library for Avalara's AvaTax suite of business tax calculation and processing services. Uses the REST v2 API.

528.3M7](/packages/avalara-avataxclient)[eslazarev/wildberries-sdk

Wildberries OpenAPI clients (generated).

252.5k](/packages/eslazarev-wildberries-sdk)[files.com/files-php-sdk

Files.com PHP SDK

2478.1k](/packages/filescom-files-php-sdk)[aimeos/prisma

A powerful PHP package for integrating media related Large Language Models (LLMs) into your applications

1942.4k4](/packages/aimeos-prisma)

PHPackages © 2026

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