forxer / ovh-sdk
An unofficial, modern PHP SDK for the OVHcloud API, built on Saloon, with Laravel integration.
0.5.0
2026-10-18 16:56 UTC
Requires
- php: ^8.4
- psr/clock: ^1.0
- psr/simple-cache: ^3.0
- saloonphp/saloon: ^4.5
Requires (Dev)
- laravel/pint: ^1.32
- orchestra/testbench: ^11.3
- pestphp/pest: ^5.3
- phpstan/phpstan: ^2.3
- rector/rector: ^2.7
- vlucas/phpdotenv: ^5.6
Suggests
- laravel/framework: Laravel 13 integration (service provider, facade, artisan command)
Provides
None
Conflicts
- laravel/framework: <13.0
Replaces
None
This package is auto-updated.
Last update: 2026-10-18 17:03:17 UTC
README
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
- Overview
- Installation: requirements, connector, regions, cache and clock
- Authentication: application keys, consumer keys, service accounts, IAM actions
- Domains and DNS zones
- Errors
- Laravel: configuration, facade, injection, cache and artisan command
- Testing:
MockClientandOvh::fake() - Changelog and Upgrade guide
License
This package is open-sourced software licensed under the MIT license.