Can't get Account Linking to work with Alexa integration

Hi, I’ve followed the guide to set up the smart home skill here:

and it’s worked OK up to ‘account linking’

After logging in I’m faced with this page:

How can I debug and find what is stopping it from linking?

When using the LONG_LIVED_ACCESS_TOKEN for testing I was able to see my HA devices, so I can assume my networking is OK.

I’m using latest HA under latest HassIO, here’s my system info:

arch armv7l
dev false
docker true
hassio true
os_name Linux
python_version 3.7.4
timezone Europe/London
version 0.96.5
virtualenv false

Configs are exactly as described in the guide, do I need to wait and try logging in later? Or is it something else?

1 Like

Hello @HypnoToad , was you able to get it working?
I’m having same problem!
Thanks, Simon

Hi @xefil, I got it going in the end, turns out I needed to use a specific port, what port are you using?

Hello @HypnoToad,
Thanks for fast reply. What do you mean as port?
My HA istance is available on 443 (ssl) with a Let’s Encrypt valid certificate. Actually it’s filtered (available) only by Amazon IPs by a firewall, but even allowing any, it’ doesn’t change.
Like you, until the account linking, all works well, even the discovery test with the long access token.

Hi yes I mean port as in network port. :slight_smile:

I was originally running my HA instance on a different port, something like port 55555 and Amazon didn’t like it.

I tried again this time with my HA instance on port 443 and it is now working for me. I’m also using a Let’s Encrypt certificate, so I’m not really sure why it’s not working for you I’m afraid. :frowning:

Which HA versione do you have?
I’m having it on docker, 0.97.2.
I’ve no idea how to test it manually as well :frowning: I mean the account linking.
I’ve opened a case on Alexa Devel as well, to have some logs

I was using 0.96.5 while setting it up, but since updated to 0.97.2

I’m running on HassIO which is essentially docker.

ok, thanks meanwhile!
Let me see what I’ll have as answer from Amazon Devel Team :slight_smile:

Ok, best of luck :slight_smile:

Thank you I have been struggling with this for a coupe of days. Changing port from 8123 to 443 worked for me.

1 Like

Nice I’m glad you got it working.

There is no mention of what port to use in the HA docs, but somewhere in the Amazon docs it mentions that port 443 should be used.

So what happens when 443 isn’t an option? I am running on 8123 and publicly accessible and using a GoDaddy cert. I have something else running on 443 so that’s not an option. I’ve read something about lambda proxies that can deal with this but have no idea what to do. Assuming you run some kind of proxy on Amazon’s servers on 443 and it redirects traffic to 8123 in my case for any lambda function you are running but no clue.


Did you manage to not use 443 port? I have the same problem, I need to use something different

I did use 443. There is no other option for Lambda. I had to get my edgerouter to act as a reverse proxy.

I’m having this issue as well - using the LONG_LIVED_ACCESS_TOKEN testing I am able to view the device without issue.

However unable to link now. I was able to link previously however once I disable and enable linking I’m getting the “We were unable to link Home Assistant at this time”