PHPackages                             antistatique/realforce-php-sdk - 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. antistatique/realforce-php-sdk

ActiveLibrary[API Development](/categories/api)

antistatique/realforce-php-sdk
==============================

Super-simple, minimum abstraction Realforce API v1.x wrapper, in PHP

1.0.0(2mo ago)13.6k↓63%MITPHPPHP &gt;=8.3CI passing

Since May 1Pushed 1mo agoCompare

[ Source](https://github.com/antistatique/realforce-php-sdk)[ Packagist](https://packagist.org/packages/antistatique/realforce-php-sdk)[ Docs](https://github.com/antistatique/realforce-php-sdk)[ RSS](/packages/antistatique-realforce-php-sdk/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (2)Used By (0)

Realforce PHP SDK
=================

[](#realforce-php-sdk)

Super-simple, minimum abstraction Realforce API v1.x wrapper, in PHP.

I hate complex wrappers. This lets you get from the Realforce API docs to the code as directly as possible.

[![Build](https://github.com/antistatique/realforce-php-sdk/actions/workflows/tests.yml/badge.svg)](https://github.com/antistatique/realforce-php-sdk/actions/workflows/tests.yml)[![Coverage Status](https://camo.githubusercontent.com/d02ea26ce4c1bf5af0d93640b58f9e3dcccc10c95b9be853cfdfa5e7e1ebd0dc/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616e746973746174697175652f7265616c666f7263652d7068702d73646b2f62616467652e737667)](https://coveralls.io/github/antistatique/realforce-php-sdk)[![Packagist](https://camo.githubusercontent.com/134483d33e657f5721b8900cbca24ee828eff201c61c97b883226696bf95b543/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f616e746973746174697175652f7265616c666f7263652d7068702d73646b2e7376673f6d61784167653d32353932303030)](https://packagist.org/packages/antistatique/realforce-php-sdk)[![License](https://camo.githubusercontent.com/0dc646e63cc7151af501f6453c6c341ac693d4abb5c21a1d07c24f546a40ae92/68747470733a2f2f706f7365722e707567782e6f72672f616e746973746174697175652f7265616c666f7263652d7068702d73646b2f6c6963656e7365)](https://packagist.org/packages/antistatique/realforce-php-sdk)[![PHP Versions Supported](https://camo.githubusercontent.com/9c50dc780fa576f5c39b4feff00c05345c1471be0808881a09e750b91220dc54/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344253230382e332d3838393242462e737667)](https://packagist.org/packages/antistatique/realforce-php-sdk)

Getting started
---------------

[](#getting-started)

You can install `realforce-php-sdk` using Composer:

```
composer require antistatique/realforce-php-sdk

```

Examples
--------

[](#examples)

See the `examples/` directory for examples of the key client features. You can view them in your browser by running the php built-in web server.

```
php -S localhost:8000 -t examples/
```

And then browsing to the host and port you specified (in the above example, `http://localhost:8000`).

### Basic Example

[](#basic-example)

Start by `use`-ing the class and creating an instance with your API key

```
use \Antistatique\Realforce\RealforceClient;
```

Every request should contain a valid API token. Use the `RealforceClient::setApiToken` method prior any requests. All private operational requests require an authentication token.

### Listing of Properties

[](#listing-of-properties)

Fetch a list of published properties' public data.

👉

```
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);

# Prepare the request.
$query = new Antistatique\Realforce\Request\PropertiesListRequest();
$query
  ->lang(['fr', 'en'])
  ->page(0)
  ->perPage(10)
;

# Fetch the list of properties.
$response = $rf->publicProperties()->list($query);
print_r($response);
```

### Labels - Amenities

[](#labels---amenities)

Fetch "amenities" labels linked to the public data you retrieve from the public API endpoints.

👉

```
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);

# Prepare the request.
$query = new Antistatique\Realforce\Request\I18nRequest();
$query
  ->lang(['fr', 'en'])
;

# Fetch the list of amenities' labels.
$response = $rf->publicLabels()->amenities($query);
print_r($response);
```

### Labels - Categories

[](#labels---categories)

Fetch "categories" labels linked to the public data you retrieve from the public API endpoints.

👉

```
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);

# Prepare the request.
$query = new Antistatique\Realforce\Request\I18nRequest();
$query
  ->lang(['fr', 'en'])
;

# Fetch the list od categories' labels.
$response = $rf->publicLabels()->categories($query);
print_r($response);
```

### Labels - Categories

[](#labels---categories-1)

Fetch "locations" labels linked to the public data you retrieve from the public API endpoints.

👉

```
# Setup the Realforce client.
$realforce = new RealforceClient();
$realforce->setApiToken($token);

# Prepare the request.
$query = new Antistatique\Realforce\Request\LocationsRequest();
$query
  ->isQuarter(true)
  ->lang(['fr', 'en'])
;

# Fetch the list of locations' labels.
$response = $rf->publicLabels()->locations($query);
print_r($response);
```

Troubleshooting
---------------

[](#troubleshooting)

To get the last error returned by either the HTTP client or by the API, use `getLastError()`:

```
echo $rf->getLastError();
```

For further debugging, you can inspect the headers and body of the response:

```
print_r($rf->getLastResponse());
print_r($rf->getLastResponsetHttpStatus());
```

If you suspect you're sending data in the wrong format, you can look at what was sent to Realforce by the wrapper:

```
print_r($rf->getLastRequest());
```

If your server's CA root certificates are not up to date you may find that SSL verification fails and you don't get a response. The correction solution for this [is not to disable SSL verification](http://snippets.webaware.com.au/howto/stop-turning-off-curlopt_ssl_verifypeer-and-fix-your-php-config/). The solution is to update your certificates. If you can't do that, there's an option at the top of the class file. Please don't just switch it off without at least attempting to update your certs -- that's lazy and dangerous. You're not a lazy, dangerous developer are you?

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance89

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

65d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1841592?v=4)[Kevin Wenger](/maintainers/WengerK)[@WengerK](https://github.com/WengerK)

---

Top Contributors

[![WengerK](https://avatars.githubusercontent.com/u/1841592?v=4)](https://github.com/WengerK "WengerK (21 commits)")

---

Tags

sdk-php

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/antistatique-realforce-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/antistatique-realforce-php-sdk/health.svg)](https://phpackages.com/packages/antistatique-realforce-php-sdk)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35916.4M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24016.2M20](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172445.0k16](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

93459.5k6](/packages/botman-driver-telegram)

PHPackages © 2026

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