- Newest
- Most votes
- Most comments
Based on the information you've provided about your Alexa skill linking issue, I can identify several potential causes and solutions:
For your redirect URI handling, your approach looks generally correct. You're properly constructing the redirect URL by appending the code and state parameters to the redirect_uri. This follows the standard OAuth 2.0 authorization code flow that Alexa expects.
Regarding your token response, the structure appears correct with the required fields (access_token, refresh_token, token_type, and expires_in). The format matches what Alexa expects for OAuth token responses.
However, there are several areas to check that might be causing the "Unable to link" error:
-
Content-Type Header: Ensure your token endpoint is returning responses with the correct Content-Type header (application/json).
-
CORS Settings: Verify that your endpoint has proper CORS (Cross-Origin Resource Sharing) headers configured to allow requests from Alexa's domains.
-
Public Accessibility: Confirm that your authentication endpoints are publicly accessible, as Alexa needs to reach them from AWS servers.
-
Error Logging: Implement proper error logging in your OAuth flow. You can add logging for:
- Request parameters in your GET/POST handlers
- Token generation and validation processes
- Redirect operations
- HTTP response codes
-
HTTP Status Codes: While you're returning a 200 status code, make sure all your endpoints return appropriate status codes for different scenarios (e.g., 400 for bad requests, 401 for unauthorized).
-
Browser/Network Issues: Try clearing browser cache and cookies, using incognito mode, or a different browser/network connection.
-
Security Certificates: If you're using HTTPS (which you should be), verify that all security certificates are valid.
If the issue persists, check your server logs during the account linking attempt to identify any specific errors that might provide more insight into what's failing during the process.
Sources
Unable to link Alexa skill with my mobile application in AWS (Dev mode testing) | AWS re:Post
Unable to link Alexa skill with my mobile application in AWS (Dev mode testing) | AWS re:Post
answered a year ago
Relevant content
- AWS OFFICIALUpdated 3 years ago
