PHPackages                             romanchehh/yaroc-v4 - 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. romanchehh/yaroc-v4

ActiveLibrary[API Development](/categories/api)

romanchehh/yaroc-v4
===================

YAROC fork for Random.org API v4 with Flexible Gambling support.

v1.3.2(7mo ago)033MITPHPPHP &gt;= 7.4

Since Oct 13Pushed 7mo agoCompare

[ Source](https://github.com/Romanchehh/yaroc-v4)[ Packagist](https://packagist.org/packages/romanchehh/yaroc-v4)[ Docs](https://github.com/Romanchehh/yaroc-v4)[ Fund](https://www.paypal.me/drupol)[ GitHub Sponsors](https://github.com/drupol)[ RSS](/packages/romanchehh-yaroc-v4/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (10)Versions (7)Used By (0)

YAROC v4
========

[](#yaroc-v4)

Yet Another [Random.org](https://random.org) Client — now with Flexible Gambling Support and extended configuration capabilities.

YAROC v4 is a modern PHP client for the [Random.org JSON-RPC API](https://api.random.org/json-rpc/), providing full support for the **Realise 4** endpoints.
This fork extends the original [drupol/yaroc](https://github.com/drupol/yaroc) with enhanced flexibility, additional configuration options, and improved license data management.

---

Why Upgrade to YAROC v4
-----------------------

[](#why-upgrade-to-yaroc-v4)

YAROC v4 introduces full support for **Random.org Signed API Release 4**, which is required for **Flexible Gambling licenses**.

### Background

[](#background)

- Random.org informed that **Release 2 of the Signed API does not properly handle Flexible Gambling licenses**.
    Previously, it would appear to work, but this was a bug.
- Starting **15 August 2025**, Release 2 will reject any API key using a Flexible Gambling license with an `API_KEY_INVALID_VERSION` error.

### What YAROC v4 Provides

[](#what-yaroc-v4-provides)

- Full compatibility with **Signed API Release 4**.
- Mandatory `licenseData` support for all API calls, allowing you to provide license-specific metadata (e.g., `maxPayoutValue`).
- Default license payload included automatically if `licenseData` is not provided.
- Seamless migration path from previous versions without breaking your existing API integration.

> **Note:** Users with Flexible Gambling licenses **must upgrade** to v4 to avoid service interruptions.

Requirements
------------

[](#requirements)

- PHP **&gt;= 7.4**
- An HTTP client (recommended: [symfony/http-client](https://github.com/symfony/http-client))

---

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

[](#installation)

```
composer require romanchehh/yaroc-v4
```

If you don’t have an HTTP client installed yet:

```
composer require symfony/http-client
```

Usage
-----

[](#usage)

First [request an API Key](https://api.random.org/api-keys) or use the temporary key.

**The temporary API key used in the examples will be disabled when the beta ends.**

Currently support all the [Random.org](https://random.org) API method calls in the [basic](https://api.random.org/json-rpc/4/basic) and [signed](https://api.random.org/json-rpc/4/signed) APIs.

Examples
--------

[](#examples)

#### Basic Example

[](#basic-example)

```
