worksection / pipedrive
Worksection fork of Pipedrive REST client for PHP
Requires
- php: >=5.4.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- apimatic/jsonmapper: ~1.3.0
- mashape/unirest-php: ~3.0.1
Requires (Dev)
- phpunit/phpunit: 4.8.*
- squizlabs/php_codesniffer: ^2.7
This package is not auto-updated.
Last update: 2025-05-20 13:46:21 UTC
README
This is a custom fork of the official Pipedrive API wrapper-client for PHP-based apps, maintained by Worksection. It builds upon the original implementation provided by Pipedrive Inc and is adapted to fit our internal integration needs.
The library offers a convenient way to interact with the Pipedrive REST API using either OAuth2 or API tokens. It supports working with objects like Deals, Persons, Organizations, Activities, Products, and more.
🛠️ Please note:
While the core code remains mostly auto-generated via APIMATIC, this fork is distributed under the Composer package nameworksection/pipedrive
, even though the internal namespace remainsPipedrive
for compatibility with existing code.
For more details about the Pipedrive API itself, visit developers.pipedrive.com.
Installation
You can install this package via Composer:
composer require worksection/pipedrive
API Documentation
Refer to the official Pipedrive REST API documentation:
👉 https://developers.pipedrive.com/v1
License
MIT License — same as the original pipedrive/pipedrive
© 2012–2020 Pipedrive, Inc.
Modified in 2025 by Worksection
Usage
With API Token
use Pipedrive\Client; $apiToken = 'YOUR_API_TOKEN'; $client = new Client(null, null, null, $apiToken); $response = $client->getUsers()->getCurrentUserData();
With OAuth2
use Pipedrive\Client; $client = new Client($clientId, $clientSecret, $redirectUri); // Store token Pipedrive\Configuration::$oAuthTokenUpdateCallback = function($token) { $_SESSION['access_token'] = $token; }; if (isset($_SESSION['access_token'])) { Pipedrive\Configuration::$oAuthToken = $_SESSION['access_token']; } $authUrl = $client->auth()->buildAuthorizationUrl();
Token refresh logic, error handling, and full examples (like authcallback.php
and index.php
) remain the same as in the original client.
Differences from the Original Pipedrive Client
- Distributed under the Composer package name
worksection/pipedrive
- Intended for internal use by Worksection with full local control
- May include small patches or improvements over time
- Code structure, autoloading, and namespace remain identical to the original (
Pipedrive\*
)
Contributing
This version is maintained for internal use by Worksection.
If you wish to contribute or reuse it, feel free to fork and adapt it to your own needs.