Skip to main content

Quickstart

Get started with the CELITECH API in minutes. This guide will walk you through obtaining your credentials, installing the SDK, and making your first eSIM purchase.

Prerequisites

Before you begin, make sure you have:

Step 1: Get Your API Credentials

  1. Log in to the CELITECH Dashboard
  2. Navigate to the Developers section in the left sidebar
  3. Click on API Credentials
  4. Copy your Client ID and Client Secret

CELITECH Dashboard

warning

Never expose your Client ID or Client Secret in frontend code, public repositories, or client-side applications. Always use them server-side and store them securely using environment variables or a secrets management tool (e.g., AWS Secrets Manager, Azure Key Vault).

Step 2: Install the SDK

Choose your preferred language and install the CELITECH SDK:

npm install celitech-sdk

or

yarn add celitech-sdk

Step 3: Make Your First Purchase

Now let's purchase an eSIM data package. The SDK handles authentication automatically using your credentials.

Understanding the Purchase Request

When creating a purchase, you need to specify:

  • destination: ISO country code (ISO2 or ISO3) where the eSIM will be used (e.g., "FRA" for France)
  • dataLimitInGB: Amount of data in gigabytes (e.g., 1 for 1GB)
  • startDate: When the package becomes active (format: YYYY-MM-DD)
  • endDate: When the package expires (format: YYYY-MM-DD, max 90 days from start)
  • quantity: Number of eSIMs to purchase (minimum 1)

Example Code

import { Celitech } from 'celitech-sdk';

(async () => {
const celitech = new Celitech({
clientId: 'CLIENT_ID',
clientSecret: 'CLIENT_SECRET',
});

const createPurchaseV2Request = {
destination: 'FRA',
dataLimitInGb: 1,
startDate: '2023-11-01',
endDate: '2023-11-20',
quantity: 1,
};

const { data } = await celitech.purchases.createPurchaseV2(createPurchaseV2Request);

console.log(data);
})();

Understanding the Response

A successful purchase returns an array with essential information:

[
{
"purchase": {
"id": "1b97b67a-f4ea-45ff-bbc1-8f424b1418c4",
"packageId": "6cf19d46-b545-4029-a46b-cdeba22b6957",
"createdDate": "2023-10-20T00:00:00+00:00"
},
"profile": {
"iccid": "1111222233334444555000",
"activationCode": "LPA:1$CELITECH.IDEMIA.IO$AAAAA-BBBBB-CCCCC-DDDDD",
"manualActivationCode": "LPA:1$CELITECH.IDEMIA.IO$AAAAA-BBBBB-CCCCC-DDDDD"
}
}
]
  • purchase.id: Unique identifier for the purchase
  • purchase.packageId: ID of the package purchased
  • purchase.createdDate: Creation date of the purchase
  • profile.iccid: Integrated Circuit Card Identifier (unique eSIM number)
  • profile.activationCode: QR code data as base64 for installing the eSIM on a device
  • profile.manualActivationCode: Manual activation code for the eSIM

Step 4: Activate the eSIM

The activationCode from the purchase response is a base64-encoded PNG image. Use this to generate a QR code that users can scan to install the eSIM on their device.

Once you have generated the QR code, follow the installation guide for your device:

tip

If you included an email parameter in the purchase request, the QR code and installation instructions are automatically sent to the user's email.

tip

Use our Postman Collection to test API endpoints without writing code, or explore the full API Reference for all available endpoints.

Next Steps

Now that you've made your first purchase, explore more features: