Skip to main content

eSIM RSP API

Overview

The eSIM RSP (Remote SIM Provisioning) API provides functionalities for managing eUICC profiles and generating QR codes for eSIM activation.

getEUICCProfile

This method returns the eUICC profile information for a specific ICCID.

Parameters

  • iccid (required): The ICCID of the eSIM (19-20 digits)

Return Type:

  • GetEUICCProfileResponse

Authorization:

  • Requires ApiUserId and ApiKeyAuth

Example

Here's how to use the eSIM RSP API to fetch eUICC profile information:

import { ESIMRSPApi, Configuration } from '@betatelltd/esim-sdk';

const config = new Configuration({
apiKey: (name: string) => {
if (name === 'x-api-key') return 'your-api-key';
if (name === 'x-user-id') return 'your-user-id';
return '';
},
basePath: 'base-url',
});
const apiInstance = new ESIMRSPApi(configuration);

let iccid: string; // The ICCID of the eSIM (19-20 digits)

const { status, data } = await apiInstance.getEUICCProfile(iccid);

Response Codes

  • 200: Success
  • 400: Bad Request - Invalid ICCID format
  • 401: Unauthorized - Invalid or missing API key
  • 404: Not Found - eUICC not found
  • 500: Internal Server Error

GetEUICCProfileResponse

The GetEUICCProfileResponse object contains the following properties:

NameTypeDescriptionNotes
iccidstringIntegrated Circuit Card Identifier[default to undefined]
imsistringInternational Mobile Subscriber Identity[default to undefined]
statestringCurrent state of the eUICC profile[default to undefined]
last_operation_datenumberUnix timestamp of last operation[default to undefined]
activation_codestringLPA activation code for eSIM provisioning[default to undefined]
reuse_remaining_countnumberNumber of remaining profile reuses[optional] [default to undefined]
reuse_enabledbooleanWhether profile reuse is enabled[optional] [default to undefined]
profile_reuse_policyProfileReusePolicyProfile reuse policy configuration[optional] [default to undefined]
release_datenumberUnix timestamp of profile release[optional] [default to undefined]
cc_requiredbooleanWhether confirmation code is required[optional] [default to undefined]
cc_retriesnumberNumber of confirmation code retries[optional] [default to undefined]

Example

import { GetEUICCProfileResponse } from '@betatelltd/esim-sdk';

const instance: GetEUICCProfileResponse = {
iccid,
imsi,
state,
last_operation_date,
activation_code,
reuse_remaining_count,
reuse_enabled,
profile_reuse_policy,
release_date,
cc_required,
cc_retries,
};

getQRCode

This method generates a QR code image containing the LPA activation code for eSIM provisioning.

Parameters

  • iccid (required): The ICCID of the eSIM (19-20 digits)

Return Type:

  • File (PNG image)

Authorization:

  • Requires ApiUserId and ApiKeyAuth

Example

Here's how to use the eSIM RSP API to generate a QR code:

import { ESIMRSPApi, Configuration } from '@betatelltd/esim-sdk';

const config = new Configuration({
apiKey: (name: string) => {
if (name === 'x-api-key') return 'your-api-key';
if (name === 'x-user-id') return 'your-user-id';
return '';
},
basePath: 'base-url',
});
const apiInstance = new ESIMRSPApi(configuration);

let iccid: string; // The ICCID of the eSIM (19-20 digits)

const { status, data } = await apiInstance.getQRCode(iccid);

Response Codes

  • 200: QR code generated successfully
  • 400: Bad Request - Invalid ICCID format
  • 401: Unauthorized - Invalid or missing API key
  • 404: Not Found - eSIM not found

ProfileReusePolicy

The ProfileReusePolicy object contains the following properties:

NameTypeDescriptionNotes
maxReuseCountnumber......
cooldownPeriodnumber......