question

jeff avatar image
jeff asked

How to Debug Authorization Error, "An error occurred while attempting to link Alexa with the external provider."

I've been fighting this for hours and hours now, and I just cannot figure out what's going wrong.

I'm working on an Alexa Home Skills app. I have the authorization URL setup, and that loads properly. But as soon as I redirect, I get the error message, "An error occurred while attempting to link Alexa with the external provider."

I've dug through the forums here and seen that a lot of people run into trouble with SSL validation. So I switched my Access Token URI to another server, signed by a different CA. Still, no luck.

I've quadruple checked every variable, value, url, and path that I can find. Everything looks right, but obviously I'm doing something wrong.

Is there some way I can figure out what the error actually is? I'm totally stabbing in the dark at this point.

alexa skills kitalexa smart home
3 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Just ran into the same issue here. Hope someone comes up with a solution, I wanna wire my house up!

1 Like 1 ·

Have same issue as well.

0 Likes 0 ·

I am stuck too. I am using Amazon SSL cert service and I get a token but I still get a linking account error. Have you tried advance rest client in chrome? You should be able to go through all the steps with the rest client . I haven't tried using a different PHP library beside the league oauth server, but I think this is the last that I need to do. There's also a desktop rest client that you can try, which is free but more complex to use, called SoapUI.

0 Likes 0 ·
Levon@Amazon avatar image
Levon@Amazon answered

Hi Jeff,

Thanks for posting! The error you are seeing is related to the certificate that you are using. To resolve that, either:

1) use Login With Amazon as a temporary OAuth2 provider, or 2) provision a different certificate (for example, certificates from DigiCert, Thawte, Entrust, and Verisign will work).

Please also see the following forum thread:

https://forums.developer.amazon.com/questions/10053/solving-the-oauth-issue-for-testing.html

3 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

How about Amazon Certificates, is it supported as well? I'm terminating SSL on ELB. My app returns token correctly/ per spec, but still getting "An error occurred while attempting to link Alexa with the external provider."

0 Likes 0 ·

@milenko By saying "Amazon Certificates", do you mean certificates signed by the Amazon-approved certificate authority: https://wiki.mozilla.org/CA:IncludedCAs

If so, then unfortunately not all certificates from that list work correctly. For the time being, please use one from the list I provided above.

0 Likes 0 ·

Levon, by Amazon Certificate I meant ACM Certificates, deployed through AWS Certificate Manager (ACM). Btw, it works for me now, I can properly connect, so ACM Certificate is supported as one would expect! Thank you for responding.

0 Likes 0 ·
newuser-5c2e805a-bc1b-4ce7-b89a-7ee8380346b4 avatar image
newuser-5c2e805a-bc1b-4ce7-b89a-7ee8380346b4 answered
@Levon@Amazon

We are using certificates from GoDaddy. Is this CA valid? So far we still got the error "An error occurred while attempting to link Alexa with the external provider.".

Please help due there is no other information we got from the result page.

4 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi, We are also using GoDaddy certs. Did you get your problem resolved? As I am also facing same issue.

0 Likes 0 ·

no. still not resolved.

0 Likes 0 ·

Hi there,

Have you been able to resolve this issue, or are you still seeing that same message? Thanks!

0 Likes 0 ·

GoDaddy certificate is valid. We are using it.

0 Likes 0 ·
steven avatar image
steven answered

Hi, I'm using digiCert certificate, but I can't receive the access token request, and get this error message too. Anyone solved this?

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Are you following the instructions as described in this documentation?

https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/linking-an-alexa-user-with-a-user-in-your-system

DigiCert shouldn't be causing any problems.

0 Likes 0 ·
nethog avatar image
nethog answered

I got same error and fighting for hours and hours on this-

I am using Amazon SecurtyProfile, i.e. the amazon OAuth2 server, and I got same error message

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

I'm not entirely sure what you mean by using Amazon SecurityProfile. Are you using the LWA security profile?

0 Likes 0 ·
SonyR&D avatar image
SonyR&D answered

I am seeing the same error using an Amazon API Gateway endpoint as the Access Token URI. From what I can tell, after the OAuth redirect, the Access Token URI is not called. Is there a way to get more detail and debug info when this error occurs?

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

SonyR&D avatar image
SonyR&D answered

This is the cert info for the Amazon API Gateway endpoint we created for Alexa's Account Linking Access Token URI. Is there something here that Alexa will complain about, like the fact it's a wildcard cert? I'm not even sure the problem is a cert problem in our case, but here it is.

Here's the error screen in Alexa when trying to complete Account Linking. The screen is displayed by Alexa after we redirect to the requested redirect_uri, providing "state" and "code".

We get no error logging on this that I can locate. How do we debug this problem?


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Brian@Amazon avatar image
Brian@Amazon answered

Are you using an in house oauth solution or using an existing/established provider? The logging we have isn't very verbose, but sometimes it can be helpful to log the requests goign in both directions through your api gateway.

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

newuser-70416987-4d3a-4c6c-90c8-523e2c0efe72 avatar image
newuser-70416987-4d3a-4c6c-90c8-523e2c0efe72 answered

HI. I am also getting these errors and I think the problem is in the cert file.

I have got cert files on networksolutions.com and it's working well when it works alone.

How can I get what's wrong about the account linking?

Regards.


223.png (88.4 KiB)
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.