Search by

forxer / ovh-sdk

forxer

An unofficial, modern PHP SDK for the OVHcloud API, built on Saloon, with Laravel integration.

Package info

github.com/forxer/ovh-sdk

pkg:composer/forxer/ovh-sdk

Statistics

Installs: 18

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 1

0.5.0 2026-10-18 16:56 UTC

This package is auto-updated.

Last update: 2026-10-18 17:03:17 UTC


README

Latest Stable Version Total Downloads License Tests

OVH SDK

An unofficial, modern PHP SDK for the OVHcloud API, built on top of Saloon, with built-in Laravel integration.

0.x: the public API may still change between minor versions until 1.0.

use OvhSdk\Auth\ApplicationKeys;
use OvhSdk\Enums\RecordType;
use OvhSdk\Enums\Region;
use OvhSdk\Ovh;

$ovh = new Ovh(
    region: Region::Eu,
    credentials: new ApplicationKeys('application-key', 'application-secret', 'consumer-key'),
);

// Read every domain of the account
foreach ($ovh->domain()->list() as $domain) {
    echo $domain->domain.' expires on '.$domain->expirationDate->format('Y-m-d').PHP_EOL;
}

// Create a DNS record, then publish the zone
$zone = $ovh->domain()->zone('example.com');
$zone->records()->create(type: RecordType::A, target: '203.0.113.10', subDomain: 'app', ttl: 3600);
$zone->refresh();

Features

  • Fluent, typed resources returning immutable DTOs and enums
  • Application keys (signed requests) and OAuth2 service accounts
  • Domains, DNS zones and DNS records, zone file parsing, and the history, web redirections and tasks of DNS zones
  • Typed exceptions for every OVHcloud error, and a dedicated, self-explaining exception for every other failure
  • Generic access to any endpoint not covered yet
  • Framework agnostic core, with an optional Laravel 13 integration in the same package
  • Easy testing with Saloon's mocking tools

Requirements

  • PHP 8.4 or higher
  • Laravel 13, only for the Laravel integration

Installation

composer require forxer/ovh-sdk

Documentation

License

This package is open-sourced software licensed under the MIT license.