- Newest
- Most votes
- Most comments
Based on the information you've provided, your token response structure appears to be correct. The JSON format with "access_token", "refresh_token", "token_type", and "expires_in" matches the expected format for OAuth token responses that Amazon Cognito and similar authentication services use.
The issue might be related to one of several factors:
-
Browser or network issues: Try clearing your browser cache and cookies, using incognito/private mode, or trying a different browser or network connection.
-
Authentication configuration: Ensure that your Alexa skill's account linking configuration matches exactly with your authentication service settings. This includes redirect URIs, client IDs, and client secrets.
-
Token endpoint issues: Verify that your token endpoint is publicly accessible and responding correctly to requests from Alexa's servers.
-
Token validation: Alexa may be attempting to validate the token but encountering issues. Make sure your tokens are properly formatted and signed if using JWTs.
-
Permissions: Check that your skill has the necessary permissions configured in the Alexa developer console.
For testing in development mode specifically:
- Confirm that your development endpoints are publicly accessible
- Verify that all security certificates are valid
- Ensure your authentication flow works end-to-end outside of the Alexa environment first
The "expires_in" value of 3600 (1 hour) is standard and shouldn't cause issues. Your refresh token handling should be fine as long as your authentication server properly accepts and processes refresh token requests.
If the problem persists, you might want to check your server logs during the account linking attempt to see if there are any specific errors being returned that could provide more insight into what's failing during the process.
Sources
The token issuer endpoint - Amazon Cognito
Community | Build On Answered | All About Amazon Alexa | S02 EP02
answered a year ago
Relevant content
- AWS OFFICIALUpdated 2 months ago

1. Browser or network issues
2. Authentication configuration
3. Token endpoint issues
4. Token validation
5. Permissions