Download the PHP package chuckbartowski/ovh-sdk without Composer

On this page you can find all versions of the php package chuckbartowski/ovh-sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ovh-sdk

# ☁️ OVHcloud SDK for PHP **A modern, fully typed PHP SDK for the entire OVHcloud API — every product, native request signing, no wrapper dependency.** [![PHP Version](https://img.shields.io/badge/PHP-%3E%3D%208.2-777BB4?logo=php&logoColor=white)](https://www.php.net/) [![Symfony](https://img.shields.io/badge/Symfony-6.4%20%7C%207.x-000000?logo=symfony&logoColor=white)](https://symfony.com/) [![Tests](https://img.shields.io/badge/tests-15%20passing-brightgreen?logo=github)](tests/) [![Coverage](https://img.shields.io/badge/products-19%20modules-blue)](#api-reference) [![License](https://img.shields.io/badge/license-MIT-yellow)](LICENSE) *Domains & DNS · Public Cloud · Dedicated · VPS · Kubernetes · Web Hosting · Email · IP · vRack · Load Balancer · SMS* [Installation](#installation) · [Authentication](#authentication) · [API Reference](#api-reference) · [Error Handling](#error-handling)

Framework-agnostic core — usable from any PHP project, script, or worker — with an optional bundle for first-class Symfony integration. The OVHcloud $1$ request signature is implemented natively (no dependency on the official ovh/ovh wrapper), with automatic clock-drift correction, typed exceptions, opt-in retries, and a comment-free, strictly typed codebase (PHP 8.2+, declare(strict_types=1) everywhere).


Table of Contents


Features

🔐 Native request signing The OVHcloud $1$ SHA-1 signature scheme implemented from scratch — no ovh/ovh dependency — with lazy clock-drift correction against /auth/time
🧩 19 product modules One facade covering the whole api.ovh.com/1.0 surface: domains, cloud, dedicated, VPS, Kubernetes, databases, hosting, email, IP, vRack, load balancers, CDN, licenses, orders, SMS, logs, support, VoIP
🌍 All endpoints ovh-eu, ovh-ca, ovh-us, kimsufi-eu/ca, soyoustart-eu/ca — pick yours or pass a custom base URL
🎫 Credential flow built in requestCredentials() mints a consumer key with the access rules you need and returns the validation URL
🚨 Production-grade errors 400/403/404/409/429 mapped to dedicated exceptions exposing OVHcloud's errorCode; opt-in automatic retries with backoff
🔓 Nothing sealed off The client's get/post/put/delete accept any path, and me()->fetch() / cloud()->fetch() reach any sub-resource, so 100% of the API is one call away
🛠 Framework-agnostic Only hard dependency is symfony/http-client; the optional Symfony bundle adds semantic config and autowiring
✅ Fully unit-tested 15 tests against MockHttpClient, including exact signature verification — no network required

Requirements

Dependency Version
PHP >= 8.2
OVHcloud an application key + secret, and a consumer key (create here)
Symfony 6.4 LTS or 7.x — optional, only for the bundle integration

Installation

If the package is published on Packagist:

Authentication

OVHcloud signs every request with X-Ovh-Signature: $1$ + sha1(secret + "+" + consumerKey + "+" + method + "+" + url + "+" + body + "+" + timestamp). This SDK does all of it for you — you only provide three credentials:

The fastest path is api.ovh.com/createToken which gives you all three at once. To mint a consumer key programmatically with a chosen scope:

The clock-drift correction is automatic: the first signed call fetches OVHcloud's server time from /auth/time and offsets every subsequent timestamp, so a skewed local clock never breaks the signature.

Quick Start (plain PHP)

Client constructor signature:

Symfony Integration (optional)

Register the bundle, then create config/packages/ovh_sdk.yaml:

The Ovh facade is then autowirable in controllers, services, commands, and message handlers.

Architecture

API Reference

Every method returns an ApiResponse and throws on failure. Service names (domains, VPS, dedicated servers…) are URL-encoded for you.

Account (me)

$ovh->me() — info(), update(), bills() / bill(id), orders() / order(id), paymentMethods(), contacts(), SSH keys (sshKeys, addSshKey, deleteSshKey), API credentials (apiApplications, apiCredentials, revokeCredential), iamPolicies(), and fetch(path) for any other /me/* endpoint.

Domains & DNS

$ovh->domains() — domain lifecycle (list, find, serviceInfos, nameservers, updateNameservers, dnssec) and the full DNS zone editor:

Method Endpoint
zones() / zone(name) /domain/zone
records(zone, filters) / record(zone, id) /domain/zone/{zone}/record
addRecord(zone, fieldType, target, subDomain, ttl) POST …/record
updateRecord(zone, id, fields) / deleteRecord(zone, id) PUT/DELETE …/record/{id}
refreshZone(zone) POST …/refresh — required to apply record changes
exportZone(zone) BIND export

Dedicated servers

$ovh->dedicatedServers() — list, find, update, serviceInfos, hardware, network, reboot, reinstall(name, options) + installStatus, bootOptions, setMonitoring, ipmiAccess, interventions, tasks.

VPS

$ovh->vps() — list, find, update, power (reboot, start, stop), reinstall(name, options), images, ips, snapshots (snapshots, createSnapshot), disks, tasks.

Public Cloud

$ovh->cloud() — every method takes the $projectId first:

Group Methods
Projects projects(), project(id), usageCurrent(id)
Instances instances, instance, createInstance, deleteInstance, rebootInstance, startInstance, stopInstance, reinstallInstance, resizeInstance
Volumes volumes, createVolume, deleteVolume, attachVolume, detachVolume, volumeSnapshots
Catalog images, flavors, regions
Network privateNetworks, createPrivateNetwork, publicNetworks
Access sshKeys, addSshKey, users, createUser, storageContainers

Anything else on a project: cloud()->fetch($projectId, '/…').

Managed Databases & Kubernetes

$ovh->cloudDatabases() — services(projectId), list(projectId, engine) (postgresql, mysql, redis, mongodb, kafka…), create, deleteCluster, databases, users, createUser, backups. $ovh->kubernetes() — clusters, cluster, create, update, deleteCluster, kubeconfig, reset, node pools (nodePools, createNodePool, updateNodePool, deleteNodePool), nodes.

Web Hosting

$ovh->webHosting() — list, find, attached domains, databases (databases, createDatabase), cron, users, SSL (ssl, requestSsl), ovhConfigs, tasks.

Email

$ovh->email() — MX Plan (domains, accounts, createAccount, deleteAccount, changePassword, redirections, mailing lists) and Exchange (exchangeServices, exchangeAccounts).

IP

$ovh->ips() — list, find, reverse DNS (reverse, setReverse, deleteReverse), move, park, firewall (firewall, enableFirewall, firewallRules, addFirewallRule), DDoS mitigation (mitigation, enableMitigation).

vRack

$ovh->vrack() — list, find, and membership management: dedicated servers, cloud projects, IP blocks (add/remove for each).

Load Balancer

$ovh->loadBalancers() — IPLB services: frontends/createFrontend, backends/createBackend, servers/addServer, pendingChanges, and refresh() to apply staged changes.

CDN, Licenses, Orders, SMS, Logs, Support, VoIP

Generic access

Any endpoint not wrapped by a module stays one call away — signing, endpoint and error handling still apply:

Responses

Note the OVHcloud idiom: list endpoints usually return arrays of identifiers (record IDs, service names), which you then fetch individually — records() returns IDs, record($zone, $id) returns the detail.

Error Handling

All SDK exceptions implement OvhSdkExceptionInterface:

Exception Thrown when Extras
ApiException The API reported a failure (modules validate automatically) getErrors(), getStatusCode(), getErrorCode(), getRaw()
↳ InvalidRequestException HTTP 400 (bad parameters, invalid signature…)
↳ ForbiddenException HTTP 403 (consumer key lacks the access rule)
↳ ResourceNotFoundException HTTP 404
↳ ConflictException HTTP 409
↳ RateLimitException HTTP 429
AuthenticationException Missing credentials, or HTTP 401 (invalid/expired consumer key) thrown before any request when credentials are missing
TransportException Network error, TLS failure, timeout, or invalid JSON wraps the symfony/http-client exception

Testing

The suite runs entirely offline against MockHttpClient — including a test that recomputes the $1$ signature byte-for-byte:

Security Notes

WHMCS module

A ready-to-use WHMCS registrar module ships in whmcs/modules/registrars/ovhsdk/. It plugs OVHcloud domains into WHMCS's DNS and nameserver management through this SDK.

Install

  1. composer require chuckbartowski/ovh-sdk in your WHMCS root.
  2. Copy the ovhsdk folder into <whmcs>/modules/registrars/.
  3. Activate OVHcloud (SDK) in System Settings » Domain Registrars and enter your application key / secret / consumer key and endpoint.
WHMCS action SDK call
Get / Save nameservers domains()->records(... NS) / updateNameservers()
Get DNS records domains()->records() + record() (MX priority split out)
Save DNS records replace all records, then refreshZone()

Domain registration and transfers go through OVHcloud's order cart (orders()), which is a multi-step purchase flow — the registrar hooks above cover the day-to-day DNS management that WHMCS drives automatically.

License

MIT


All versions of ovh-sdk with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
symfony/http-client Version ^6.4|^7.0
symfony/http-client-contracts Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chuckbartowski/ovh-sdk contains the following files

Loading the files please wait ...