Table of Contents

Class PlayitPartnerService

Namespace
McServerLauncher.Services
Assembly
McServerLauncher.dll

Third-party "Integration"-tier onboarding: exchanges a Playit account_setup_code (that the user obtained from playit.gg) for a per-user self-managed agent secret key. The request goes through a small proxy (a Cloudflare Worker, see playit-proxy/) that injects the partner Api-Key server-side — so NO secret ships inside this (public, open-source) app. Everything after uses the returned per-user secret via PlayitApiService.

public class PlayitPartnerService
Inheritance
PlayitPartnerService
Inherited Members

Constructors

PlayitPartnerService()

public PlayitPartnerService()

PlayitPartnerService(string?, HttpClient?)

Test/overridable constructor. Null baseUrl uses the proxy (or PLAYIT_PROXY_URL).

public PlayitPartnerService(string? baseUrl, HttpClient? http)

Parameters

baseUrl string
http HttpClient

Properties

IsConfigured

Always available: the proxy URL is baked in and there is no per-app secret to set.

public bool IsConfigured { get; }

Property Value

bool

Methods

CreateAgentAsync(string, CancellationToken)

Exchanges the user's setup code for their own self-managed agent secret key (via the proxy). Throws InvalidOperationException (with a localized message) on network/API failure or an invalid/expired code.

public Task<CreateAgentResult> CreateAgentAsync(string setupCode, CancellationToken ct = default)

Parameters

setupCode string
ct CancellationToken

Returns

Task<CreateAgentResult>