Skip to content

TypeScript SDK

A typed method for every API operation, on Node.js, Deno and Bun.

Latest release0.2.2npm

View as Markdown (opens in a new tab)
Agent setup

Install

Node.js 22.12 or later (tested on 22, 24 and 26), Deno 2 or Bun. The package is an ES module. You also need OAuth2 credentials: the client ID and secret of a service account.

Terminal
npm install @ovhcloud/sdk # Node.jsdeno add npm:@ovhcloud/sdk # Denobun add @ovhcloud/sdk # Bun

First program

This prints the details of your account: `GET /v1/me`. Copy it, set your credentials, run it.

TypeScript
import { Client } from "@ovhcloud/sdk"; const client = new Client(); // reads OVH_CLIENT_ID, OVH_CLIENT_SECRET, OVH_REGION const account = await client.me.getAccountDetails(); // GET /v1/meconsole.log("account:", account.nichandle);console.log("email: ", account.email);console.log("country:", account.country);

Run it

Terminal
export OVH_CLIENT_ID=... OVH_CLIENT_SECRET=...export OVH_REGION=eu # eu (default), ca or usnode first.ts # Node.js 22.18 or later runs TypeScript as it is
NextOKMS SDK →