Skip to main content

C++ SDK

The mod.io C++ SDK makes it possible to browse, install, update, and manage user-generated content (UGC) in your game by integrating with the mod.io REST API.

The SDK is a C++17, cross-platform wrapper around mod.io's API and common UGC workflows. It provides a consistent public interface for:

  • Communicating with mod.io services (searching, subscriptions, user state, etc.)
  • Managing local content (downloads, updates, installs, and removals)
  • Handling asynchronous work without blocking your game thread

Connecting your game to mod.io

To connect the C++ SDK to mod.io, you will need to create a game profile in the mod.io dashboard. This game profile is where mod.io hosts your UGC and where you configure the features your game uses.

At a high level, your integration requires:

  • A mod.io Game ID identifying your game on mod.io
  • An API key used by the SDK to authenticate requests for that game
  • The correct environment (Live or Test) and portal (storefront/platform) when you initialize the SDK

Once those values are configured in your title and passed into the SDK, your game can make requests to mod.io and manage UGC on disk.

note

mod.io provides a sandbox environment (test.mod.io) for development and QA. The SDK supports this via the environment parameter you pass during initialization.

How the SDK wraps the REST API

Most SDK calls map closely to REST operations (for example: listing mods, fetching mod details, subscribing/unsubscribing). The main differences are:

  • The public API is callback-based and non-blocking. Methods that begin asynchronous work use the Async suffix.
  • Callbacks are invoked when you run the SDK event loop (see RunPendingHandlers).
  • SDK types provide strong, consistent shapes for requests and results (for example FilterParams for queries and Optional results alongside an ErrorCode).

The complete public interface is declared in modio/ModioSDK.h. If you want to understand the available functions and their callback signatures at a glance, that header is the canonical reference.

You can download the mod.io C++ SDK from GitHub. Once you have, follow the C++ SDK Getting Started guides to set up your game or application to use the SDK.

We also have official plugins for Unreal Engine or Unity.

Getting started

If you're new to the SDK, start with the Getting Started overview. It links to the core setup guide series and walks through the recommended learning path.

SDK Features

  • Async callback-based interface
  • Non-blocking IO with a 'bring your own thread' model
  • Header-only, separate compilation or static library support with a C++17 compiler
  • Automatic downloads and updates
  • SSO authentication for email, Steam, Epic Games Store, console platform and custom implementations
  • UGC browsing and filtering

Feature Guides

The C++ SDK is compatible with a variety of mod.io's features. These are additions to the core SDK that are designed to streamline and elevate your game's UGC.

Feature guides:

Platform Support

The mod.io SDK supports all current-generation desktop platforms, mobile and consoles. You'll need to request SDK Access for Windows (GDK), Xbox, PlayStation®4, PlayStation®5 or Switch.

PlatformSupportCompiler
WindowsMSVC C++ 2019+
Windows (GDK)Vendor-provided
Nintendo SwitchVendor-provided
Xbox (GDK)Vendor-provided
PlayStation®4Vendor-provided
PlayStation®5Vendor-provided
LinuxClang 10
MacOSClang 10
iOSClang 10
AndroidClang 10