SmartThings DuckDns API error setting up the SmartApp (solved)

edit: Don’t know how to mark as solved.

Anyone recently get this working? I have DuckDNS working correctly. I can remotely log into my Home Assistant. When I follow the steps to install the SmartThings Integration it gets stuck at the Enter Personal Access Token.

I get:

SmartThings could not validate the webhook URL. Please ensure the webhook URL is reachable from the internet and try again.

When I look at the error Log it says (Full error log at the bottom)

I tried api_password: really long password thingy generated by HA
and that did not work

I tried to add to my config file

external_url:
  https://mysubdomain.duckdns.org:8123

and got

Component error: external_url - Integration ‘external_url’ not found.

I now have this in my YAML

http:
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem

Any Help?

Full Error Log

Logger: homeassistant.components.smartthings.config_flow
Source: components/smartthings/smartapp.py:145
Integration: SmartThings (documentation, issues)
First occurred: 5:06:32 PM (2 occurrences)
Last logged: 5:07:24 PM

API error setting up the SmartApp: {'requestId': '4BB0879F-8A07-430E-B45A-CC3F05E69FDF', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'TargetTimeoutError', 'target': 'https://192.168.15.20:8123/api/webhook/ee75d107fece891853c536fca15c79384ad147e70ddbc821b65a02360f3f00c5', 'message': 'Upstream target timed out', 'details': []}]}}
API error setting up the SmartApp: {'requestId': '3FCE08E0-363B-4C28-9B4E-038989AD9013', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'TargetTimeoutError', 'target': 'https://192.168.15.20:8123/api/webhook/ee75d107fece891853c536fca15c79384ad147e70ddbc821b65a02360f3f00c5', 'message': 'Upstream target timed out', 'details': []}]}}
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/smartthings/config_flow.py", line 131, in async_step_pat
    app, client = await create_app(self.hass, self.api)
  File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 145, in create_app
    app, client = await api.create_app(app)
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/smartthings.py", line 110, in create_app
    entity = await self._service.create_app(app.to_data())
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/api.py", line 171, in create_app
    return await self.post(API_APPS, data)
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/api.py", line 395, in post
    return await self.request("post", self._api_base + resource, data=data)
  File "/usr/local/lib/python3.8/site-packages/pysmartthings/api.py", line 368, in request
    raise APIResponseError(
pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "4BB0879F-8A07-430E-B45A-CC3F05E69FDF", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "TargetTimeoutError", "target": "https://192.168.15.20:8123/api/webhook/ee75d107fece891853c536fca15c79384ad147e70ddbc821b65a02360f3f00c5", "message": "Upstream target timed out", "details": []}]}}

Of Course after I wrote that I get the answer a half hour later:

homeassistant:
  external_url: https://yoursub.duckdns.org
  internal_url: http://192.168.15.20:8123

Ím not getting over this … Same webhook api error

When im trying to log in via https, i get error “SSL_ERROR_RX_RECORD_TOO_LONG”, http works.

2022-11-04 11:26:41.897 ERROR (MainThread) [homeassistant.components.smartthings.config_flow] API error setting up the SmartApp: {'requestId': 'F79AEC1B-xxxx-xxxx-xxxx-FE9695484304', 'error': {'code': 'ConstraintViolationError', 'message': 'The request is malformed.', 'details': [{'code': 'TargetTimeoutError', 'target': 'https://secret.duckdns.org:8123/api/webhook/b3d3ccf4e8af76c6a52bb4ad90949749a981c509fb1710d7571b6aeee8984114', 'message': 'Upstream target timed out', 'details': []}]}}
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/smartthings/config_flow.py", line 124, in async_step_pat
app, client = await create_app(self.hass, self.api)
File "/usr/src/homeassistant/homeassistant/components/smartthings/smartapp.py", line 147, in create_app
app, client = await api.create_app(app)
File "/usr/local/lib/python3.10/site-packages/pysmartthings/smartthings.py", line 110, in create_app
entity = await self._service.create_app(app.to_data())
File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 171, in create_app
return await self.post(API_APPS, data)
File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 395, in post
return await self.request("post", self._api_base + resource, data=data)
File "/usr/local/lib/python3.10/site-packages/pysmartthings/api.py", line 368, in request
raise APIResponseError(
pysmartthings.errors.APIResponseError: Unprocessable Entity (422): {"requestId": "F79AEC1B-xxxx-xxxx-xxxx-FE9695484304", "error": {"code": "ConstraintViolationError", "message": "The request is malformed.", "details": [{"code": "TargetTimeoutError", "target": "https://secret.duckdns.org:8123/api/webhook/b3d3ccf4e8af76c6a52bb4ad90949749a981c509fb1710d7571b6aeee8984114", "message": "Upstream target timed out", "details": []}]}}