PHPackages                             akeneo-salesforce/salesforce-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. [HTTP &amp; Networking](/categories/http)
4. /
5. akeneo-salesforce/salesforce-api

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

akeneo-salesforce/salesforce-api
================================

A library for interacting with the Salesforce REST API and managing the OAuth flow

2.0.7(8y ago)65.9k1MITPHPPHP &gt;=7.0.4

Since Jun 11Pushed 8y ago2 watchersCompare

[ Source](https://github.com/anaelChardan/salesforce-api-php-wrapper)[ Packagist](https://packagist.org/packages/akeneo-salesforce/salesforce-api)[ RSS](/packages/akeneo-salesforce-salesforce-api/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (16)Used By (0)

SalesForce Library
==================

[](#salesforce-library)

Warning : Work in progess

\###Aim

Call The SalesForce API (v37.0 at this time) in order to call API functionnalities easily. The main advantage is that you don't have to be preoccuped by the token, the library maintains it. Also, you are authentificated correctly to make a CLI application.

### Install

[](#install)

`$ composer require akeneo-salesforce/salesforce-api`

### Documentation

[](#documentation)

#### Usage

[](#usage)

##### The client

[](#the-client)

```
$client = new Akeneo\SalesForce\Connector\SalesForceClient(
    $myUsername,
    $myPassword,
    $myClientId,
    $myClientSecret,
    $myLoginUrl,
    new GuzzleHttp\Client(),
    new Akeneo\SalesForce\Authentification\AccessTokenGenerator()
);

```

#### Usage in Symfony

[](#usage-in-symfony)

This bundle can be easily integrated to a Symfony2 project, you just have to declare two services:

First declare your parameters in your parameters.yml

- sales\_force.username
- sales\_force.password
- sales\_force.client\_id
- sales\_force.client\_secret
- sales\_force.login\_url (For example: '')

```
services:
    akeneo_sales_force.authentification.token_generator:
        class: Akeneo\SalesForce\Authentification\AccessTokenGenerator

    akeneo_sales_force.connector.client:
        class: Akeneo\SalesForce\Connector\SalesForceClient
        arguments:
            - "%sales_force.username%"
            - "%sales_force.password%"
            - "%sales_force.client_id%"
            - "%sales_force.client_secret%"
            - "%sales_force.login_url%"
            - "@guzzle.client"
            - "@akeneo_sales_force.authentification.token_generator"

```

And then use your client service like any other service.

#### Make a query

[](#make-a-query)

A QueryBuilder is given to make [SOQL](https://developer.salesforce.com/docs/atlas.en-us.202.0.soql_sosl.meta/soql_sosl/) query.

See available functionnalities into the class itself.

Example

```
$queryBuilder = new Akeneo\SalesForce\Query\QueryBuilder();

$queryBuilder
            ->select('Id')
            ->from('Account')
            ->where($queryBuilder->getNotEqualCondition('Name', ':nameId'))
            ->setParameter('nameId', 'AccountPlop')
        ;

$client->search($queryBuilder->getQuery());

```

### Next

[](#next)

- Fit the old repo structure -&gt; [Thanks to Crunch](https://github.com/crunch-accounting/salesforce-api-php-wrapper)
- Make tests with PHP Spec

### More

[](#more)

This library is made with &lt;3 by [Akeneo](https://www.akeneo.com/)

Do not hesitate to contribute.

Maintained by Anaël CHARDAN.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 81.2% 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 ~65 days

Recently: every ~59 days

Total

15

Last Release

3068d ago

Major Versions

1.1.2 → 2.0.02016-07-05

PHP version history (2 changes)1.0.3PHP &gt;=5.5

2.0.0PHP &gt;=7.0.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/26c72c3b7cf2ff961b3333d463cfb42ef12e06a454a12aa9a49ef615a286ba3d?d=identicon)[LeoBenoist](/maintainers/LeoBenoist)

![](https://www.gravatar.com/avatar/2d07de25fcd8b0af1171f5dc2527a6e42e6586138246a5215a9775be5d01c11f?d=identicon)[anaelChardan](/maintainers/anaelChardan)

---

Top Contributors

[![ArthurGuy](https://avatars.githubusercontent.com/u/92837?v=4)](https://github.com/ArthurGuy "ArthurGuy (56 commits)")[![anaelChardan](https://avatars.githubusercontent.com/u/6115681?v=4)](https://github.com/anaelChardan "anaelChardan (7 commits)")[![Nuscly](https://avatars.githubusercontent.com/u/1038299?v=4)](https://github.com/Nuscly "Nuscly (3 commits)")[![manolo317](https://avatars.githubusercontent.com/u/23258654?v=4)](https://github.com/manolo317 "manolo317 (2 commits)")[![richardTowers](https://avatars.githubusercontent.com/u/1696784?v=4)](https://github.com/richardTowers "richardTowers (1 commits)")

---

Tags

apiphpsalesforceapirestoauth2salesforce

### Embed Badge

![Health badge](/badges/akeneo-salesforce-salesforce-api/health.svg)

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

###  Alternatives

[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[zoonman/linkedin-api-php-client

LinkedIn API PHP SDK with OAuth 2.0 &amp; CSRF support. Can be used for social sign in or sharing on LinkedIn. Examples. Documentation.

127704.0k](/packages/zoonman-linkedin-api-php-client)[xsolve-pl/salesforce-client

Salesforce REST client for PHP

3018.1k](/packages/xsolve-pl-salesforce-client)

PHPackages © 2026

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