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. [API Development](/categories/api)
4. /
5. obto/salesforce-rest-api

ActiveLibrary[API Development](/categories/api)

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 2w ago

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 62% 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

2978d 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://avatars.githubusercontent.com/u/104553443?v=4)[obto](/maintainers/obto)[@OBTo](https://github.com/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

[sylius/sylius

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

8.5k5.8M712](/packages/sylius-sylius)[tempest/framework

The PHP framework that gets out of your way.

2.2k31.1k12](/packages/tempest-framework)[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)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3661.2M46](/packages/tencentcloud-tencentcloud-sdk-php)[theodo-group/llphant

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

1.7k371.6k6](/packages/theodo-group-llphant)[keboola/storage-api-client

Keboola Storage API PHP Client

10397.4k31](/packages/keboola-storage-api-client)

PHPackages © 2026

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