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
ApiUserIdandApiKeyAuth
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:
| Name | Type | Description | Notes |
|---|---|---|---|
| iccid | string | Integrated Circuit Card Identifier | [default to undefined] |
| imsi | string | International Mobile Subscriber Identity | [default to undefined] |
| state | string | Current state of the eUICC profile | [default to undefined] |
| last_operation_date | number | Unix timestamp of last operation | [default to undefined] |
| activation_code | string | LPA activation code for eSIM provisioning | [default to undefined] |
| reuse_remaining_count | number | Number of remaining profile reuses | [optional] [default to undefined] |
| reuse_enabled | boolean | Whether profile reuse is enabled | [optional] [default to undefined] |
| profile_reuse_policy | ProfileReusePolicy | Profile reuse policy configuration | [optional] [default to undefined] |
| release_date | number | Unix timestamp of profile release | [optional] [default to undefined] |
| cc_required | boolean | Whether confirmation code is required | [optional] [default to undefined] |
| cc_retries | number | Number 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
ApiUserIdandApiKeyAuth
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:
| Name | Type | Description | Notes |
|---|---|---|---|
| maxReuseCount | number | ... | ... |
| cooldownPeriod | number | ... | ... |