AMAPI's AddEsimParams.activationCode is mandatory by Google's design. I’m not sure I draw the same conclusion as you from the docs..
The activation code is the destination from which the profile is downloaded, it can either be a full profile or a partial profile, in the latter you don’t provide an activation code with a full eSIM configured, but rather point to an SM-DP+ server that has device identifiers mapped to an eSIM config on that end. If you want the admin not to type a code, the EMM has to fetch one via direct integration with the carrier. The EMM then calls AMAPI's AddEsim with the carrier-supplied code and the user sees nothing.
I’ve implemented this a couple of times to date, perhaps these references will help:
From a usage standpoint,
- The EMM user obtains an LPA activation code from the carrier / SM-DP+ provider independently - typically a string like
LPA:1$smdp.example.com$MATCHING_ID. - Submits it via the Add eSIM command. Flash sends
addEsimParams.activationCode plus activationState (defaulting to ACTIVATION_STATE_UNSPECIFIED if you don't set it - see amapi-command.ts ADD_ESIM body construction). - On a fully managed device running Android 15+, AMAPI downloads and activates the profile with no user interaction.
If you literally don't have an activation code, your real question is for the SM-DP+/carrier, not the EMM - ask them to issue an activation code (or per-device matching IDs) you can feed into addEsimParams. AMAPI has no EID-only download path today.
Thanks for the ping @Kirk :)