home-assistant/core · error · ValueError
No application_credentials platform for {domain}
Error message
No application_credentials platform for {domain} What it means
Raised by ApplicationCredentialsStorageCollection._process_create_data when a client credential is created for an integration domain that does not implement the application_credentials platform. Home Assistant only stores OAuth client credentials for integrations that declare their authorization server via a components/<domain>/application_credentials.py module. Creating a credential for any other domain is rejected with this ValueError.
Source
Thrown at homeassistant/components/application_credentials/__init__.py:94
class AuthorizationServer:
"""Represent an OAuth2 Authorization Server."""
authorize_url: str
token_url: str
class ApplicationCredentialsStorageCollection(collection.DictStorageCollection):
"""Application credential collection stored in storage."""
CREATE_SCHEMA = vol.Schema(CREATE_FIELDS)
@override
async def _process_create_data(self, data: dict[str, str]) -> dict[str, str]:
"""Validate the config is valid."""
result = self.CREATE_SCHEMA(data)
domain = result[CONF_DOMAIN]
if not await _get_platform(self.hass, domain):
raise ValueError(f"No application_credentials platform for {domain}")
return result
@callback
@override
def _get_suggested_id(self, info: dict[str, str]) -> str:
"""Suggest an ID based on the config."""
return f"{info[CONF_DOMAIN]}.{info[CONF_CLIENT_ID]}"
@override
async def _update_data(
self, item: dict[str, str], update_data: dict[str, str]
) -> dict[str, str]:
"""Return a new updated data object."""
raise ValueError("Updates not supported")
@override
async def async_delete_item(self, item_id: str) -> None:
"""Delete item, verifying credential is not in use."""View on GitHub (pinned to 58a3fdb3ea)
Solutions
- Verify the integration actually supports application credentials: check that homeassistant/components/<domain>/application_credentials.py exists (or the integration docs mention setting up an 'Application Credentials' helper).
- Fix the domain value in the create request to match a supported integration's domain exactly.
- If you develop the integration, add an application_credentials.py module with async_get_authorization_server() (and async_get_auth_implementation() if needed).
- If the platform file exists but the integration is not loaded, load the integration first (e.g. via config flow) so _get_platform resolves.
Example fix
# custom_components/my_integration/application_credentials.py
from homeassistant.core import HomeAssistant
from homeassistant.components.application_credentials import AuthorizationServer, ClientCredential, async_register_client_credential
async def async_get_authorization_server(hass: HomeAssistant) -> AuthorizationServer:
return AuthorizationServer(
authorize_url="https://example.com/oauth/authorize",
token_url="https://example.com/oauth/token",
) Defensive patterns
Strategy: validation
Validate before calling
from homeassistant.helpers import config_validation as cv
from homeassistant.components.application_credentials import async_get_application_credentials
from homeassistant.loader import async_get_integration
async def domain_supports_app_credentials(hass, domain: str) -> bool:
integration = await async_get_integration(hass, domain)
return (integration.file_path / "application_credentials.py").exists() Try / catch
try:
await collection.async_create_item({"domain": domain, "client_id": cid, "client_secret": secret})
except ValueError as err:
if "No application_credentials platform" in str(err):
# surface to user: integration lacks OAuth app credential support
raise Prevention
- Before creating a credential, confirm the integration ships an application_credentials.py platform.
- Spell the domain exactly as the integration directory name.
- In custom integrations, implement async_get_authorization_server so the platform resolves.
When it happens
Trigger: Calling the websocket command application_credentials/create (or YAML import via async_import_item) with a 'domain' field whose integration has no application_credentials.py platform. Also triggered when _get_platform(hass, domain) returns None because the integration is not loaded or has no async_get_authorization_server implementation.
Common situations: Typos in the domain field when creating credentials through a websocket/API client; attempting to add OAuth app credentials for an integration that only supports config-flow auth without application credentials; a custom integration missing the application_credentials platform; the domain from a config entry that was set up before OAuth support was added.
Related errors
- username_not_normalized
- Operation mode not supported
- Command not found. Exiting sequence
- Updates not supported
- Cannot delete credential in use by integration {entry.domain
AI-assisted analysis of home-assistant/core@58a3fdb3ea (2026-08-14).
Data as JSON: /api/errors/b61ba9b54bbd33c7.
Report an issue: GitHub.