Onomondo.ApiClient 1.0.0-alpha.3

This is a prerelease version of Onomondo.ApiClient.
dotnet add package Onomondo.ApiClient --version 1.0.0-alpha.3
                    
NuGet\Install-Package Onomondo.ApiClient -Version 1.0.0-alpha.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Onomondo.ApiClient" Version="1.0.0-alpha.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Onomondo.ApiClient" Version="1.0.0-alpha.3" />
                    
Directory.Packages.props
<PackageReference Include="Onomondo.ApiClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Onomondo.ApiClient --version 1.0.0-alpha.3
                    
#r "nuget: Onomondo.ApiClient, 1.0.0-alpha.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Onomondo.ApiClient@1.0.0-alpha.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Onomondo.ApiClient&version=1.0.0-alpha.3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Onomondo.ApiClient&version=1.0.0-alpha.3&prerelease
                    
Install as a Cake Tool

Onomondo.ApiClient

An unofficial .NET API client for Onomondo, a global IoT connectivity platform. This library provides a strongly-typed, modern C# interface to interact with the Onomondo API.

Features

  • SIM Management: List, retrieve, and update SIM cards
  • Tag Management: Organize SIMs with tags
  • Real-time Traffic Monitoring: Subscribe to live packet capture events via WebSocket
  • Address Range Utilities: Helper methods to identify Onomondo IP ranges
  • Pagination Support: Automatic cursor-based pagination using async enumerables
  • AOT Compatible: Supports Native AOT compilation for optimal performance

Installation

dotnet add package Onomondo.ApiClient

Quick Start

Configuration with Dependency Injection

using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();

services.AddOnomondoApiClient(options =>
{
    options.ApiKey = "your-api-key-here";
});

var serviceProvider = services.BuildServiceProvider();
var client = serviceProvider.GetRequiredService<IOnomondoApiClient>();

Usage Examples

Working with SIMs

List All SIMs
// Get all SIMs using async enumerable with automatic pagination
await foreach (var sim in client.Sims.EnumerateSimsAsync())
{
    Console.WriteLine($"SIM {sim.Iccid}: {sim.Label}");
    Console.WriteLine($"  IP: {sim.Ipv4}");
    Console.WriteLine($"  Online: {sim.Online}");
}

// Or manually control pagination
var page = await client.Sims.ListSimsAsync(limit: 50);
foreach (var sim in page.Sims)
{
    Console.WriteLine($"SIM: {sim.Iccid}");
}
Manage Tags on SIMs
// Add a tag to a SIM
await client.Sims.AddTagAsync("sim-id", "tag-id");

// Remove a tag from a SIM
await client.Sims.RemoveTagAsync("sim-id", "tag-id");

// Set a tag (adds only if not already present)
bool wasAdded = await client.Sims.SetTagAsync("sim-id", "tag-id");

Real-time Traffic Monitoring

Monitor live packet capture events from your SIMs:

using Onomondo.ApiClient;

var monitor = new TrafficMonitor("your-api-key-here");

// Connect to the WebSocket
await monitor.ConnectAsync();

// Subscribe to packets from a specific SIM
var subscription = await monitor.SubscribeAsync("sim-id");

// Process captured packets
await foreach (var packet in subscription)
{
    Console.WriteLine($"Packet from {packet.SimId}");
    Console.WriteLine($"  IP: {packet.SimIp}");
    Console.WriteLine($"  Size: {packet.PacketBytes.Length} bytes");
    Console.WriteLine($"  Timestamp: {packet.Timestamp}");
    
    // Process raw packet bytes
    AnalyzePacket(packet.PacketBytes);
}

// Unsubscribe when done
await monitor.UnsubscribePacketsAsync("sim-id");

// Disconnect
await monitor.DisconnectAsync();
Multiple SIM Monitoring
// Subscribe to multiple SIMs simultaneously
var subscription1 = await monitor.SubscribeAsync(["sim-id-1", "sim-id-2"]);

// Process captured packets
await foreach (var packet in subscription)
{
    // Packet from either sim
    Console.WriteLine($"Packet from {packet.SimId}");
}

IP Address Range Utilities

Verify if an IP address belongs to Onomondo's infrastructure:

using System.Net;
using Onomondo.ApiClient;

var ipAddress = IPAddress.Parse("185.228.69.100");

// Check if IP is from a SIM
if (OnomondoAddressRanges.IsSimAddress(ipAddress))
{
    Console.WriteLine("This IP belongs to an Onomondo SIM");
}

// Check if IP is from a webhook source
if (OnomondoAddressRanges.IsWebhookAddress(ipAddress))
{
    Console.WriteLine("This is a valid Onomondo webhook source");
}

Error Handling

The client uses ApiException from Refit for HTTP errors and OnomondoException for traffic monitoring errors.

License

MIT

Disclaimer

This is an unofficial client library and is not affiliated with or endorsed by Onomondo. Use at your own risk.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.3 44 2/23/2026
1.0.0-alpha.2 48 2/18/2026
1.0.0-alpha.1 54 2/11/2026
1.0.0-alpha.0 46 2/11/2026