I am trying to build the native skill for Smart Home Skill and as a first step trying to test the account linking using Oauth2 authentication .
The type of authentication we are using is authorization code grant as this is must for the Smart Home skill.
However, the account linking is not successful and is failing despite the steps followed from the Amazon’s OAuth2 documentation.
As per the documentation this authorization involves 2 steps as below and looks like 2ndstep is failing somewhere from amazon .
- The authorization server must be able to accept the required parameters, authenticate the user, generate an authorization code, then redirect the user to the Amazon-provided redirect_uri.
This step looks OK and we are able to generate the code and redirecting it to one of the amazon’s whitelisted URI
- The access token URI must accept client credentials and the authorization code and return an access_token (and optionally, a refresh_token that can be used to get a new access_token in the future) for the user.
As per the logs in our server we are generating it correctly but for some reason amazon is throwing error of not able to link the account.
We are returning something like below for the token (refresh token is optional , so we tried with or without referesh token with no luck)
Skill Id: amzn1.ask.skill.ec47e193-e812-4334-bc56-ae92e110553b
Skill Name: AlphaSmartCam
Account Info: 15087912781/password1
Is there a way amazon can track the logs and share it to see what’s going wrong here ?
Please note this is being tested from local environment(Authorization URI & Access Token url https is supported with ngrok support)