Skip to content

Commit 36e526f

Browse files
authored
Update application_credentials example with redirect_url (#2547)
1 parent 9ec91f3 commit 36e526f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/core/platform/application_credentials.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Translations for Application Credentials are defined under the `application_cred
132132
```json
133133
{
134134
"application_credentials": {
135-
"description": "Navigate to the [developer console]({console_url}) to create credentials then enter them below.",
135+
"description": "Navigate to the [developer console]({console_url}) to create credentials. Add `{redirect_url}` under *Authorized redirect URI*. Then enter the credentials below.",
136136
}
137137
}
138138
```
@@ -141,12 +141,14 @@ You may optionally add description placeholder keys that are added to the messag
141141

142142
```python
143143
from homeassistant.core import HomeAssistant
144+
from homeassistant.helpers import config_entry_oauth2_flow
144145

145146
async def async_get_description_placeholders(hass: HomeAssistant) -> dict[str, str]:
146147
"""Return description placeholders for the credentials dialog."""
147148
return {
148149
"console_url": "https://example.com/developer/console",
150+
"redirect_url": config_entry_oauth2_flow.async_get_redirect_uri(hass),
149151
}
150152
```
151153

152-
While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md)
154+
While developing locally, you will need to run `python3 -m script.translations develop` to see changes made to `strings.json` [More info on translating Home Assistant.](translations.md)

0 commit comments

Comments
 (0)