Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

ESimProfile Resource


(warning)

Warning

Super SIM's downloadable eSIM Profiles API is currently in Public Beta . Some features are not yet implemented and others may be changed before the product is declared as Generally Available. Beta products are not covered by a Twilio SLA . Learn more about beta product support(link takes you to an external page).

(information)

Info

To avoid ambiguity, throughout this page Sim (initial cap) refers to the Sim API resource. SIM (all caps) refers to the physical Subscriber Identity Module (that is, a SIM card) associated with a Sim resource.

An ESimProfile resource represents a digital Super SIM profile that can be downloaded onto an eSIM (eUICC) that uses consumer profiles:


_10
https://supersim.twilio.com/v1/ESimProfiles

An ESimProfile instance can be referenced in the API by its unique sid:


_10
https://supersim.twilio.com/v1/ESimProfiles/{sid}

An ESimProfile allows you to request a Super SIM profile for an eUICC SIM and allows you to manage the eSIM profiles.

When you create an ESimProfile resource, a SIM profile will be asynchronously reserved for you on Twilio's eSIM subscription management service (SM-DP+). After the reservation completes, you'll be able to download the SIM profile to your eSIM. You can configure a callback URL to be automatically notified when the SIM profile is available for download, and when it has been downloaded.

To use your SIM profile to connect to cellular networks, configure and activate the Sim resource that is created during the reservation process. The Sim resource can be configured before or after the SIM profile is downloaded. When your reservation is complete, the ESimProfile resource's Status will be updated to available and its SimSid will be updated with the unique identifier of the Sim resource you will use to manage its connectivity.

If you configured the ESimProfile resource's CallbackUrl, a notification will be sent to you with the Sim resource's Sid when the ESimProfile resource's Status is updated to available. See Asynchronous updates for more details about the notifications sent.

Once a consumer SIM profile has been downloaded to your eSIM, you will no longer be able to update the ESimProfile resource that represents it. You will manage the SIM profile's connectivity using the Sim resource created during the reservation process and you, or an application running on your device, will manage which SIM profile should be enabled from your device.

(warning)

Warning

Please make sure you have the following two items before using this API to reserve a Super SIM Profile:

• A consumer profile eUICC SIM in your device.
• Local Profiles Assistant (LPA) software in your device to download and manage SIM profiles. See The Benefits of Consumer Profile eSIMs for IoT devices for more details.

Reserving a SIM profile will result in the corresponding SIM resource being associated with your account and your account being charged for the cost of a SIM profile.

You can learn more about consumer eSIMs in this eSIM whitepaper(link takes you to an external page) from the GSMA.

(error)

Danger

A Super SIM profile can be downloaded only once to an eUICC SIM. Once it is downloaded, it can be used only with that eUICC SIM. It cannot be downloaded again or used with another eUICC SIM.


Pricing

pricing page anchor

Each Super SIM eSIM profile costs $3. Your Twilio account will be charged before the eSIM profile becomes available for download.

Volume discounts are available. Contact sales-wireless@twilio.com to speak to an IoT Sales Specialist.


Supported download methods

supported-download-methods page anchor

There are multiple approaches defined by the GSMA that can be used to download a consumer SIM profile to your device.

Default SM-DP+

default-sm-dp page anchor

The Default SM-DP+ method uses the EID of the eSIM to reserve an eSIM profile on the SM-DP+ server. Using your Local Profiles Assistant (LPA), your device can reach out to the SM-DP+ URL provided to it to check if there is a profile available for it. This method can be advantageous if you have a large number of devices for which you already know the EIDs. You can instruct all of your devices to contact the same SM-DP+ URL and not worry about giving each device a unique matching ID to identify the eSIM profile for it. To use this approach, provide the EID of your eSIM as the eid property when reserving an eSIM profile through this resource. If your LPA or device prompts you for a matching ID or an activation code, leave it blank or provide an empty string.

The Activation Code method can be used to reserve an eSIM profile that can be claimed and downloaded by any eSIM enabled device. You do not need to know the EID of the eSIM that will claim the eSIM profile. Instead, when you create an eSIM Profile resource, an eSIM profile will be reserved on our SM-DP+ server and a matching ID will be generated, identifying that specific profile. Any eSIM capable device can then contact the SM-DP+ server at its address and provide the eSIM profile's matching ID to claim it. This is the approach typically used when QR codes are used to add eSIM profiles to devices. To use the Activation Code approach, when creating an eSIM Profile resource, set the generate_matching_id request parameter to true.

(information)

Info

Customers may request that eSimProfile data be deleted. If you wish to do so, please contact Twilio Support through the Console(link takes you to an external page) or Help Center(link takes you to an external page). For more information on Twilio's data retention and deletion policy, please see this support document(link takes you to an external page).


Resource properties
sidtype: SID<HP>Not PII

The unique string that we created to identify the eSIM Profile resource.


account_sidtype: SID<AC>Not PII

The SID of the Account(link takes you to an external page) to which the eSIM Profile resource belongs.


iccidtype: stringPII MTL: 30 days

The ICCID(link takes you to an external page) associated with the Sim resource.


sim_sidtype: SID<HS>Not PII

The SID of the Sim(link takes you to an external page) resource that this eSIM Profile controls.


statustype: enum<STRING>Not PII

The status of the eSIM Profile. Can be: new, reserving, available, downloaded, installed or failed. See the eSIM Profile Status Values(link takes you to an external page) for a description of each.

Possible values:
newreservingavailabledownloadedinstalledfailed

eidtype: stringNot PII

Identifier of the eUICC that can claim the eSIM Profile.


smdp_plus_addresstype: string<URI>Not PII

Address of the SM-DP+ server from which the Profile will be downloaded. The URL will appear once the eSIM Profile reaches the status available.


matching_idtype: stringNot PII

Unique identifier of the eSIM profile that can be used to identify and download the eSIM profile from the SM-DP+ server. Populated if generate_matching_id is set to true when creating the eSIM profile reservation.


activation_codetype: stringNot PII

Combined machine-readable activation code for acquiring an eSIM Profile with the Activation Code download method. Can be used in a QR code to download an eSIM profile.


error_codetype: stringNot PII

Code indicating the failure if the download of the SIM Profile failed and the eSIM Profile is in failed state.


error_messagetype: stringNot PII

Error message describing the failure if the download of the SIM Profile failed and the eSIM Profile is in failed state.


date_createdtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was created specified in ISO 8601(link takes you to an external page) format.


date_updatedtype: string<DATE TIME>Not PII

The date and time in GMT when the resource was last updated specified in ISO 8601(link takes you to an external page) format.


urltype: string<URI>Not PII

The absolute URL of the eSIM Profile resource.


The table below describes the available status values of an ESimProfile instance.

newThe initial value of an ESimProfile resource. Your request to create an eSIM profile has been accepted and we will begin the process of reserving an eSIM profile for you.
reservingAn eSIM profile is being reserved for you but is not yet ready for download.
availableAn eSIM profile is ready to be downloaded. A Sim resource has been created. Your account has been charged for the profile.
downloadedThe eSIM profile has been claimed. It is not guaranteed that an ESimProfile resource will be updated from available to downloaded after the profile has been downloaded. The ESimProfile can no longer be updated.
installedThe eSIM has confirmed that the SIM profile has been successfully installed.When eSIMs are manufactured with profiles pre-installed, the ESimProfile resource will be added in this state.
failedYour SIM profile either failed to be reserved or can no longer be downloaded from the SM-DP+.

The ESimProfile resource will typically move through new and reserving within a few seconds and does not require you to take any action.


Create an ESimProfile resource to reserve a Super SIM profile

create-an-esimprofile-resource-to-reserve-a-super-sim-profile page anchor
POST https://supersim.twilio.com/v1/ESimProfiles

Parameters

create-parameters page anchor
Request body parameters
CallbackUrltype: stringNot PII

The URL we should call using the callback_method when the status of the eSIM Profile changes. At this stage of the eSIM Profile pilot, the a request to the URL will only be called when the ESimProfile resource changes from reserving to available.


CallbackMethodtype: enum<HTTP METHOD>Not PII

The HTTP method we should use to call callback_url. Can be: GET or POST and the default is POST.

Possible values:
HEADGETPOSTPATCHPUTDELETE

GenerateMatchingIdtype: booleanNot PII

When set to true, a value for Eid does not need to be provided. Instead, when the eSIM profile is reserved, a matching ID will be generated and returned via the matching_id property. This identifies the specific eSIM profile that can be used by any capable device to claim and download the profile.


Eidtype: stringNot PII

Identifier of the eUICC that will claim the eSIM Profile.

Reserve an ESimProfile resource

reserve-an-esimprofile-resource page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.supersim.v1.esimProfiles
_10
.create({eid: ''})
_10
.then(esim_profile => console.log(esim_profile.sid));

Output

_16
{
_16
"sid": "HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"iccid": null,
_16
"sim_sid": null,
_16
"status": "new",
_16
"eid": "",
_16
"smdp_plus_address": null,
_16
"matching_id": null,
_16
"activation_code": null,
_16
"error_code": null,
_16
"error_message": null,
_16
"date_created": "2020-09-01T20:00:00Z",
_16
"date_updated": "2020-09-01T20:00:00Z",
_16
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16
}


Reserving and downloading a SIM profile completes asynchronously. Throughout this process, the ESimProfile resource will be updated. To receive a notification each time the ESimProfile resource updates, set its callback_url and callback_method properties.

The ESimProfile resource will be updated at each of the following events:


SIM profile successfully reserved

sim-profile-successfully-reserved page anchor

Your SIM profile has been reserved and is ready for download. The status property will be updated to available. The smdp_plus_address property will be updated with the URL of the SM-DP+.

The Sim resource that needs to be activated before you can connect to the cellular networks has also been created. The sim_sid property will be updated.


SIM profile reservation failed

sim-profile-reservation-failed page anchor

Your requested SIM profile could not be reserved. The status property will be updated to failed. The error_code and error_message properties will be updated to indicate what went wrong.


Your SIM profile has been successfully downloaded. The status property will be updated to downloaded. The eid property will be updated with the EID of the eSIM that downloaded the SIM profile.


SIM profile failed to download

sim-profile-failed-to-download page anchor

Something went wrong and your SIM profile can no longer be downloaded. The status property will be updated to failed. The error_code and error_message properties will be updated to indicate what went wrong.


Your SIM profile has been successfully installed on the eSIM. The status property will be updated to installed.


If you set the callback_url and callback_method properties on your ESimProfile resource, the asynchronous request made to that URL will contain the following parameters:

ESimProfileSidThe unique SID of the ESimProfile resource that this callback is in reference to.
SimSidThe unique SID of the Sim resource used to manage this SIM profile's connectivity.
SimIccidThe ICCID of the SIM profile to be downloaded to your eSIM.
ESimProfileStatusThe status of the ESimProfile resource that this callback is in reference to.
EidThe EID of the eSIM that can or did download the SIM profile.
SmdpPlusAddressAddress of the SM-DP+ from which the SIM profile can be downloaded.
ErrorCodeError code to identify what went wrong.
ErrorMessageDescription of what went wrong.

Fetch an ESimProfile resource

fetch-an-esimprofile-resource page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.supersim.v1.esimProfiles('')
_10
.fetch()
_10
.then(esim_profile => console.log(esim_profile.sid));

Output

_16
{
_16
"sid": "HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"iccid": "8988307aaaaaaaaaaaaa",
_16
"sim_sid": "HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_16
"status": "available",
_16
"eid": "89049032005008882600033489aaaaaa",
_16
"smdp_plus_address": "sm-dp-plus.twilio.com",
_16
"matching_id": null,
_16
"activation_code": null,
_16
"error_code": null,
_16
"error_message": null,
_16
"date_created": "2020-09-01T20:00:00Z",
_16
"date_updated": "2020-09-01T20:00:00Z",
_16
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_16
}

Read all ESimProfile resources

read-all-esimprofile-resources page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.supersim.v1.esimProfiles
_10
.list({eid: '', limit: 20})
_10
.then(esimProfiles => esimProfiles.forEach(e => console.log(e.sid)));

Output

_29
{
_29
"esim_profiles": [
_29
{
_29
"sid": "HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"iccid": "8988307aaaaaaaaaaaaa",
_29
"sim_sid": "HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_29
"status": "available",
_29
"eid": "89049032005008882600033489aaaaaa",
_29
"smdp_plus_address": "sm-dp-plus.twilio.com",
_29
"matching_id": null,
_29
"activation_code": null,
_29
"error_code": null,
_29
"error_message": null,
_29
"date_created": "2020-09-01T20:00:00Z",
_29
"date_updated": "2020-09-01T20:00:00Z",
_29
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_29
}
_29
],
_29
"meta": {
_29
"first_page_url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=0",
_29
"key": "esim_profiles",
_29
"next_page_url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=1",
_29
"page": 0,
_29
"page_size": 50,
_29
"previous_page_url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=0",
_29
"url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=0"
_29
}
_29
}


QR codes and eSIM Profiles

qr-codes-and-esim-profiles page anchor

You may have seen QR codes used to install eSIM profiles on traditional consumer devices such as phones or tablets. The QR code contains the SM-DP+ address and the matching ID of the eSIM profile to claim, if one was generated, in a specific format. This combined SM-DP+ URL and matching ID are used to construct an "activation code" that is formatted the following way with each element separated by a $:


_10
"1${SM-DP+_ADDRESS}${MATCHING_ID}"

To create a QR code containing an eSIM profile's activation code you will need to precede it with LPA:. For example, the following QR code contains this activation code:


_10
LPA:1$TWL.PROD.ONDEMANDCONNECTIVITY.COM$TAB80-FUT45-XKLX8-BFGT6

eSIM QR Code.

Rate this page: