---
title: App Config
menu_group: App Config
menu_order: 1
tab: App Settings
tab_order: 1
admin_slug: mediablaster_app_config
summary: Platform-specific app behavior, branding, layout, and feature visibility for connected TV and mobile clients.
---

# App Config

**Location:** MediaBlaster → **App Config**

Configure how connected apps (starting with the MediaBlaster Roku app) behave, look, and navigate. Settings are stored in WordPress and served publicly to clients via the REST config endpoint.

This is **not** API discovery — the app must already know your WordPress site URL to request config. Do not store `apiBaseUrl`, `apiOrigin`, secrets, or private credentials here.

## Config view tabs

| Tab | URL query | Status |
|-----|-----------|--------|
| **App Settings** | `platform=roku` (default) | Available |
| Mobile, Google TV, Fire TV, Apple TV, Next.js | Future platform tabs | Planned |

Tab URL:

- App Settings: `admin.php?page=mediablaster_app_config&platform=roku`

**Roku ad settings** (`advertisements` in the REST response) are managed under **MediaBlaster → Roku License → Monetization** when the Roku License Auth addon is active. Legacy App Config Monetization URLs redirect there automatically.

Saving updates all fields on the App Settings form; values not in the form are preserved.

## Storage

| Item | Value |
|------|-------|
| WordPress option | `mediablaster_app_config` |
| Platform slice | `mediablaster_app_config['roku']` |
| Capability | `manage_options` |
| Save action | `admin_post_mediablaster_save_app_config` |

PHP classes:

- `includes/class-mediablaster-app-config.php` — defaults, merge, sanitize, REST assembly
- `includes/class-mediablaster-app-config-admin.php` — admin UI
- `includes/rest/class-mediablaster-rest-app-config-controller.php` — `GET /config`

Admin assets: `admin/css/wp-smart-tv-app-config-admin.css` (extends CMB2 options-page styling).

## Sections (App Settings tab)

| Section | Purpose |
|---------|---------|
| **General** | App name, app icon (56×56), debug mode |
| **Content Availability** | VOD, movies, series, categories, search, continue watching |
| **Branding** | Colors, fallback images, card/poster aspect ratios |
| **Links** | Support and privacy URLs |
| **Sidebar** | Sidebar visibility and widths |
| **Navigation Features** | Which destinations appear in app navigation (`features` object) |
| **Labels** | Custom UI labels (`labels` object) |
| **Homepage Layout** | Home screen layout toggles (`layout` object) |
| **Home Tag Rows** | Tag-based home row settings (`homeTagRows` object) |
| **Boot** | Startup behavior (`boot` object) |
| **REST Endpoint** | Read-only display of the public config URL |

Each field includes inline help text under its label. Section titles include a short description.

## REST endpoint

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

- Public, read-only (no authentication required)
- Default `platform` query value: `roku`
- Unsupported platform → `400 mediablaster_invalid_platform`

See [REST API — App Config](rest-api-app-config.md) for the response shape.

**Not the same as** `GET /app/config` — that route returns subscription/Stripe client configuration when the subscriptions module and REST API are enabled. See [Subscriptions and Apps API](rest-api-subscriptions.md).

## Defaults and saving

- If nothing has been saved, the endpoint returns built-in Roku defaults immediately.
- Boolean toggles use CMB2-style switches (`value="on"`).
- `homeRows` is always `[]` in v1 (no admin UI yet).
- `advertisements` defaults are merged in REST; when Roku License Auth is active, saved ad settings come from `mbra_roku_monetization` (see Roku License → Monetization).
- Hidden future fields remain in the schema and REST response; their values are preserved on save but are not shown in the admin UI. Remove keys from `MediaBlaster_App_Config::get_admin_hidden_field_keys()` to expose them in a later release.

## Filters (developers)

| Filter | Purpose |
|--------|---------|
| `mediablaster_app_config_platforms` | Register additional platform slugs |
| `mediablaster_app_config` | Adjust merged platform config before REST assembly |
| `mediablaster_app_config_response` | Adjust final REST payload |

## Related guides

- [REST API — App Config](rest-api-app-config.md)
- [REST API Overview](rest-api-overview.md)
- [Getting Started](getting-started.md)
