---
title: REST API — App Config
menu_group: REST API
menu_order: 5
tab: App Config
tab_order: 5
summary: Public platform app configuration feed for Roku and future TV/mobile clients.
---

# REST API — App Config

Platform-specific **behavior, branding, layout, and feature visibility** for connected apps.

## Endpoint

```
GET /wp-json/mediablaster/v3/config?platform=roku
```

| Property | Value |
|----------|-------|
| Auth | None (public) |
| Method | GET |
| Query `platform` | Default `roku`; currently only `roku` is supported |

Discovery index includes `links.config` pointing to this URL.

## What this endpoint is (and is not)

**Is:**

- Remote source of truth for user-configurable app settings managed under **MediaBlaster → App Config**
- Branding colors, labels, navigation feature flags, home layout, boot behavior, ad settings, and similar client settings

**Is not:**

- API discovery — the client must already know the WordPress base URL
- Subscription or Stripe configuration — use `GET /app/config` instead (requires subscriptions REST enabled)
- A place for secrets — never include API keys, tokens, or `apiBaseUrl` / `apiOrigin`

## Query parameters

| Param | Default | Description |
|-------|---------|-------------|
| `platform` | `roku` | Platform slug (`roku` only in v1) |

Invalid platform:

```json
{
  "code": "mediablaster_invalid_platform",
  "message": "Unsupported platform.",
  "data": { "status": 400 }
}
```

## Response overview (Roku)

Top-level fields include:

| Field | Description |
|-------|-------------|
| `platform` | `roku` |
| `schemaVersion` | Config schema version (e.g. `1.0`) |
| `appName` | Display name |
| `appIcon` | 56×56 app icon (URL or Roku package path) |
| `debugMode` | Diagnostic logging toggle |
| `enableSubscriptions` | App-level subscriptions UI toggle |
| `enableVod`, `enableMovies`, `enableSeries`, … | Content availability flags |
| `brandColor`, `accentOrange`, … | Branding colors (hex) |
| `heroFallbackImage`, `posterFallbackImage` | Roku asset paths |
| `supportUrl`, `privacyUrl` | Public legal/help links |
| `sidebarEnabled` | Sidebar visibility |
| `features` | Navigation destination flags (`home`, `movies`, `series`, …) |
| `labels` | Custom UI strings |
| `layout` | Home screen layout flags |
| `sidebar` | `expandedWidth`, `collapsedWidth` |
| `homeTagRows` | Tag row settings |
| `homeRows` | Always `[]` in v1 |
| `boot` | `requireDiscovery`, `loadFeaturedOnStart` |
| `advertisements` | Ad settings object (see below) |
| `meta.generatedAt` | ISO 8601 timestamp (UTC) |

### `advertisements`

Managed under **MediaBlaster → Roku License → Monetization** (Roku License Auth addon). Values are stored in `mbra_roku_monetization` and injected into the config response via the `mediablaster_app_config` filter.

| Field | When present | Description |
|-------|--------------|-------------|
| `enabled` | Always | Whether client-side ads are enabled |
| `vastUrl` | Only when `enabled` is `true` and a URL is configured | Public VAST or VMAP tag URL for ad requests |

Example when ads are disabled:

```json
"advertisements": {
  "enabled": false
}
```

Example when ads are enabled:

```json
"advertisements": {
  "enabled": true,
  "vastUrl": "https://pubads.g.doubleclick.net/gampad/ads?iu=/21775744923/external/vmap_ad_samples&sz=640x480&cust_params=sample_ar%3Dpremidpost&ciu_szs=300x250&gdfp_req=1&ad_rule=1&output=vmap&unviewed_position_start=1&env=vp&cmsid=496&vid=short_onecue&correlator="
}
```

Values merge saved WordPress options over plugin defaults. When Roku License Auth is active, `advertisements` comes from `mbra_roku_monetization`. Unsaved installs still return sensible defaults.

## Admin configuration

App Settings: **MediaBlaster → App Config**. See [App Config](app-config.md).

Roku ad settings: **MediaBlaster → Roku License → Monetization** (`mbra_roku_monetization`).

## Compare with `/app/config`

| Route | Purpose | Auth | Requires subscriptions |
|-------|---------|------|------------------------|
| `GET /config?platform=roku` | Platform app UI/behavior config | Public | No |
| `GET /app/config` | Stripe keys, tiers, auth flags | Public when REST on | Yes (+ REST enabled) |

## Verification

```powershell
wp eval "do_action('rest_api_init'); `$req = new WP_REST_Request('GET', '/mediablaster/v3/config'); `$req->set_param('platform','roku'); `$res = rest_get_server()->dispatch(`$req); echo `$res->get_status();" --path="c:\Users\rob\Local Sites\wp-smart-tv\app\public"
```

Or open `/wp-json/mediablaster/v3/config?platform=roku` in a browser.

## Related guides

- [App Config](app-config.md)
- [REST API Overview](rest-api-overview.md)
- [Subscriptions and Apps API](rest-api-subscriptions.md) — `/app/config`
