PHPackages                             obto/salesforce-rest-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. obto/salesforce-rest-api

ActiveLibrary

obto/salesforce-rest-api
========================

v2.1.6(8y ago)0242MITPHPPHP &gt;=5.5

Since Jul 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/obto/salesforce-rest-api)[ Packagist](https://packagist.org/packages/obto/salesforce-rest-api)[ RSS](/packages/obto-salesforce-rest-api/feed)WikiDiscussions master Synced yesterday

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

salesforce-rest-api
===================

[](#salesforce-rest-api)

A simple PHP client for the Salesforce REST API

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

[](#installation)

Install with composer:

```
composer require "Obto/salesforce-rest-api"

```

Usage
-----

[](#usage)

Initialize the `Salesforce\Client` class, call the APIs you want.

```
use Obto\Salesforce;
use Obto\Salesforce\Exception;

$authentication = new Salesforce\Authentication\PasswordAuthentication(
	"ClientId",
	"ClientSecret",
	"Username",
	"Password",
	"SecurityToken"
);
$salesforce = new Salesforce\Client($authentication, "na5");

try {
	$contactQueryResults = $salesforce->query("SELECT AccountId, LastName
		FROM Contact
		WHERE FirstName = ?",
		array('Alice')
	);
	foreach($contactQueryResults as $queryResult) {
		print_r($queryResult);  // The output of a single record from the query API JSON, converted to associative array
	}

    $contactQueryResults2 = $salesforce->query("SELECT AccountId, LastName
        FROM Contact
        WHERE FirstName = :firstName",
        array('firstName' => 'Bob')
    );
    foreach($contactQueryResults2 as $queryResult) {
        print_r($queryResult);  // The output of a single record from the query API JSON, converted to associative array
    }

} catch(Exception\SalesforceNoResults $e) {
	// Do something when you have no results from your query
} catch(Exception\Salesforce $e) {
	// Error handling
}
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 74.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 ~60 days

Recently: every ~0 days

Total

18

Last Release

2930d ago

Major Versions

v1.1.0 → v2.0.02015-09-09

PHP version history (2 changes)v1.0.0PHP &gt;=5.3

v2.1.0PHP &gt;=5.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ceb4b615e9ce495deb05142cc67079357087807287eec8dd351e11abf63ff96?d=identicon)[obto](/maintainers/obto)

---

Top Contributors

[![mikegillis677](https://avatars.githubusercontent.com/u/5703580?v=4)](https://github.com/mikegillis677 "mikegillis677 (23 commits)")[![foxdavidj](https://avatars.githubusercontent.com/u/684747?v=4)](https://github.com/foxdavidj "foxdavidj (8 commits)")

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.6k509.9M17.0k](/packages/laravel-framework)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[drupal/core

Drupal is an open source content management platform powering millions of websites and applications.

19462.3M1.3k](/packages/drupal-core)[theodo-group/llphant

LLPhant is a library to help you build Generative AI applications.

1.5k311.5k5](/packages/theodo-group-llphant)[nutgram/nutgram

The Telegram bot library that doesn't drive you nuts

714214.9k8](/packages/nutgram-nutgram)[tempest/framework

The PHP framework that gets out of your way.

2.1k23.1k9](/packages/tempest-framework)

PHPackages © 2026

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