Optional Readonlycheckpoint?: undefinedReadonlyseed: stringOptional Readonlysnapshot?: undefinedOptionaldangerAcceptInvalidCerts?: booleanAllow invalid TLS certificates in the native transport.
This is useful for local debugging setups, but should stay disabled for normal production traffic.
Optionallocation?: MobileDeviceLocationThe coarse position the device knows, when the caller models one. The 450 app sends it on the search results, the 451 app sends none on a device without one; when set it replaces a restored snapshot's position.
Optionalnetwork?: MobileNetworkThe network the device is on (default: cellular LTE for a new device; a
restored snapshot keeps the network it was saved with). Pass
{ kind: 'wifi' } to present the device on Wi-Fi; when set it also
replaces a restored snapshot's network.
OptionalprotocolMode?: TransportProtocolModeProtocol mode of the native transport (default http2: Android goes over
TCP by the owner's decision). http3 is the caller's opt-in to the app's
QUIC path (supported by the transport since 0.9.21); auto is http2 on
this profile.
Optionalproxy?: stringHTTP(S) proxy URL passed to the native transport.
OptionalrequestTimeoutMs?: numberTimeout of every API request in milliseconds (default 60 000). A timed-out request is abandoned, not cancelled: an action may still be carried out by the server, so a retry can duplicate it.
Optional Readonlycheckpoint?: undefinedOptional Readonlyseed?: undefinedReadonlysnapshot: object | MobileSnapshotOptionaldangerAcceptInvalidCerts?: booleanAllow invalid TLS certificates in the native transport.
This is useful for local debugging setups, but should stay disabled for normal production traffic.
Optionallocation?: MobileDeviceLocationThe coarse position the device knows, when the caller models one. The 450 app sends it on the search results, the 451 app sends none on a device without one; when set it replaces a restored snapshot's position.
Optionalnetwork?: MobileNetworkThe network the device is on (default: cellular LTE for a new device; a
restored snapshot keeps the network it was saved with). Pass
{ kind: 'wifi' } to present the device on Wi-Fi; when set it also
replaces a restored snapshot's network.
OptionalprotocolMode?: TransportProtocolModeProtocol mode of the native transport (default http2: Android goes over
TCP by the owner's decision). http3 is the caller's opt-in to the app's
QUIC path (supported by the transport since 0.9.21); auto is http2 on
this profile.
Optionalproxy?: stringHTTP(S) proxy URL passed to the native transport.
OptionalrequestTimeoutMs?: numberTimeout of every API request in milliseconds (default 60 000). A timed-out request is abandoned, not cancelled: an action may still be carried out by the server, so a retry can duplicate it.
The Instagram Android app on a virtual device, as a
Layer: everything the package's public effects and screens run on — the login, the screens and their actions, the shared mobile effects,ExportSnapshotandProtocolDiagnostics. The process entriesAndroidIgpapi.install,launchand theresume…build this same layer from the same options and run one program on it.Start from
seed(a deterministic new device) or fromsnapshot(a session exported earlier withExportSnapshot, as an object). The other options are those of the native transport and the device's network. A checkpoint is not an option here: the checkpoint is the whole process, soAndroidIgpapi.resumeSilently({ checkpoint, … })and its siblings continue it on its own screen, building the process themselves.One build is one app process. Building the layer creates the device and session state, the native transport client and the process state (screen stack, navigation, telemetry); everything the program changes lives in that build. Provide the layer once around the whole program, or keep it in a
ManagedRuntimeyou own: providing it to two programs separately starts two processes from the same input. Export the snapshot inside the program (or the runtime) whose state it should carry.A snapshot that cannot be restored (a damaged cookie jar or state) fails the build with
SnapshotDecodeError, an expected failure to handle — usually by logging in again. Asnapshotkey present butundefinedis not a snapshot: it is the caller's "no saved session", so the layer starts a fresh install instead of failing. Invalid options (a request timeout out of range, a protocol mode the Android profile does not have) are a programming error and fail the build as a defect.