TypeScript SDK
The official TypeScript client is generated from the OpenAPI 3.1 contract, so it can never drift from the API. Every request and response is fully typed.
Install
Section titled “Install”npm install @interglobe/sdkQuickstart
Section titled “Quickstart”import { InterGlobe } from "@interglobe/sdk";
const ig = new InterGlobe({ apiKey: process.env.IG_API_KEY! }); // ig_test_… → sandbox, ig_live_… → production
// Provision an eSIM.const esim = await ig.esims.provision({ product_id: "prod_eu_5gb" });
// Assign a data bundle.await ig.bundles.assign(esim.iccid, { product_id: "prod_uk_5gb" });
// Fetch the install profile (QR / LPA / one-tap links).const install = await ig.esims.install(esim.iccid);console.log(install.lpa, install.qr_code);
// Near-real-time usage.const usage = await ig.esims.usage(esim.iccid);console.log(usage.used_bytes, usage.remaining_bytes);Auth & environments
Section titled “Auth & environments”The environment is carried by the API key prefix (ig_test_ → sandbox, ig_live_ → production) and the base
URL is chosen automatically. Override it when needed:
const ig = new InterGlobe({ apiKey, baseUrl: "https://api.interglobe.io/v1", apiVersion: "2026-07-01" });Idempotency & errors
Section titled “Idempotency & errors”Every mutating request is sent with an auto-generated Idempotency-Key, so retries
never double-execute. Any non-2xx throws an InterGlobeError — match on the stable code:
import { InterGlobeError } from "@interglobe/sdk";
try { await ig.esims.get("nope");} catch (err) { if (err instanceof InterGlobeError) { console.error(err.status, err.type, err.code, err.requestId); }}The SDK also verifies webhook signatures for you (constructWebhookEvent,
verifyWebhookSignature).
Resources
Section titled “Resources”ig.esims, ig.bundles, ig.messages, ig.sharedPools, ig.products, ig.coverage, ig.usage,
ig.wallet, ig.webhookEndpoints, ig.events, and ig.me(). Request/response types are exported
(import type { components } from "@interglobe/sdk") and match the API Reference exactly.