TypeScript SDK
The SimJuno TypeScript SDK provides typed access to the reseller and eSIM APIs from TypeScript or JavaScript. It includes authentication, retries, timeouts, error types, and request and response types.
The package is available as simjuno on npm, and its source is available on GitHub.
Install
The SDK supports Node.js 18+, Bun 1.0+, Deno 1.25+, Cloudflare Workers, Vercel, and React Native.
Create a client
Create an API key, store it in SIMJUNO_API_KEY, and initialize the client. Keep the key in server-side code; do not expose it in a browser or mobile application.
The SDK uses https://api.simjuno.com/v1 by default and sends the API key in the x-api-key header.
Work with eSIMs
The SDK follows the standard SimJuno integration flow. This example finds a plan, confirms its current details, and places an order:
Ordering eSIMs debits your reseller balance. If you retry the same order, reuse both its transaction_id and orderList.
After receiving the ORDER_STATUS webhook, retrieve the provisioning details for each returned eSIM ID:
Available methods
Handle errors
Non-success responses throw SimjunoApiError or one of its status-specific subclasses:
Configure retries and timeouts
Requests time out after 60 seconds and retry up to two times by default for 408, 429, and 5xx responses. Retries count toward your rate limit.
Set defaults when creating the client:
Override them for one request with the second argument:
Each request also accepts headers, queryParams, and an abortSignal. Add .withRawResponse() to a request when you need response headers or status metadata:
Use exported types
Request and response interfaces are available from the SimjunoApi namespace: