Smartthings Integration Error - Unable to setup the SmartApp. Please try again

ok so i’ve only just installed home assistant and as soon as i click on smart things as adding the integration it brings up the following error

Home Assistant is not configured correctly to receive updates from SmartThings. The webhook URL is invalid:

http://192.168.1.2:8123/api/webhook/efsdfsdfdsfdsf695306731cea98251dsfsdfsdfsdfsdfsdfsdfcba5aa9c32d09071f5b68

i’ve not had a chance to add a api key or anything yet. that IP is the home assistant IP (not smart things hub)

any ideas? i obviously can’t ‘remove’ anything since i’ve never managed to add anything to start with !

Having to delete smarthings account and re-add it is not the greatest approach especially if you have made any adjustment to smarthings inside home assistant. this will cause al those adjustments to fail and have to be redone over again every time you need to update the PAT. this is a horrible approach and need to be corrected properly so that the access toke is able to be updated when needed. the point in all of this is to make things simpler easier not more complicidad

Your webhook needs to be https and be accessible externally.
For example, https://ha.yourdomain.com/api/webhook/xxxx

Also, you will need to configure the integration from your external access because it checks the origin.
For example, https://ha.yourdomain.com
In other words, you can’t inform your external webhook and configure the integration from your local IP address.

1 Like

If you’re like me and are using Cloudflare for your external access, the problem was Cloudflare’s Bot Fight Mode issuing Managed Challenges to SmartThings’ requests.

You can verify the problem here: https://dash.cloudflare.com/<your account id>/<your zone name>/security/events

For me, I didn’t care so I disabled the whole product by going to https://dash.cloudflare.com/<your account id>/<your zone name>/security/bots (Security > Bots in the LHS menu) and disabling the product, but I believe you can disable it for specific requests using a Configuration Rule.