Skip to content

unable to link Alexa skill with my mobile application in development/testing mode

0

1. Browser or network issues

  • When I enable the skill, my login page opens. After submitting, I log in successfully, and then I am redirected back to aws Alexa application . Then authorize API also gets triggered. Everything I receive is properly verified, and only after I send a response, this issue occurs.

2. Authentication configuration -In authentication, I receive the client ID, secret key, and redirect URI. I compare them, and after verifying that everything matches, I send the response.

Token response => {
access_token:
'd639de6cdbd6c27148bd3d122040bae1efadc5aec780c7720a5c09e358c0f4f0',
refresh_token: 'feafaa11edc6207d8550b6bfc91c4588ad3f4e69bbd5997915e159e5af0f30c068a75fa546544a81c59cdd84cb74bc1a20e440400952899ab5743ea4ba41ea1f',
token_type: 'Bearer',
expires_in: 3600
 }

3. Token endpoint issues

  • My token endpoint is supposed to be publicly accessible because Alexa from AWS sends requests to it. I respond to those requests, but after that, this issue occurs.
  • It sounds like Alexa is successfully reaching your token endpoint, but something in the response or the flow afterward is causing the “Unable to link” error.
  • We should check:
  • The format of the token response (access_token, token_type, expires_in, refresh_token, etc.).
  • The redirect_uri in the response – it must match exactly what Alexa expects ?.
  • Any logs from Alexa – sometimes it gives an error code or reason that tells exactly what went wrong ?.
  • If you share a sample of your

4. Token validation

  • I generate tokens using crypto for token validation. Will this cause any issue in token generation?
  • I send the response like this:
Token response => {
access_token:
'd639de6cdbd6c27148bd3d122040bae1efadc5aec780c7720a5c09e358c0f4f0',
refresh_token: 'feafaa11edc6207d8550b6bfc91c4588ad3f4e69bbd5997915e159e5af0f30c068a75fa546544a81c59cdd84cb74bc1a20e440400952899ab5743ea4ba41ea1f',
token_type: 'Bearer',
expires_in: 3600
 }
  • Here, the access token is generated as 32 bytes and the refresh token as 64 bytes.

5. Permissions

  • I have no idea how to configure permissions in the Alexa Developer Console.
1 Answer
0

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.

Since you're able to successfully authenticate and receive the token response, but encounter the "Unable to link the skill at this time" error afterward, here are some potential issues to check:

  1. Token Format: While your token structure is correct, ensure there are no extra spaces, special characters, or formatting issues in the actual response. The access token and refresh token values should be properly formatted strings.

  2. Content-Type Header: Make sure your token endpoint is returning the response with the correct Content-Type header (application/json).

  3. CORS Settings: If applicable, verify that your endpoint has the proper CORS (Cross-Origin Resource Sharing) headers configured to allow requests from Alexa's domains.

  4. Token Length: You mentioned generating a 32-byte access token and 64-byte refresh token. While these lengths should be fine, some systems might have specific requirements. Try checking if there are any token length limitations in the Alexa documentation.

  5. Permissions in Alexa Developer Console: For permissions configuration, check the "Permissions" section in your Alexa skill configuration. Ensure that any required permissions for account linking are enabled.

  6. Skill Configuration: Double-check that your skill's account linking configuration in the Alexa Developer Console exactly matches your authentication service settings, including authorization URL, token URL, client ID, and client secret.

  7. Testing Environment: If you're testing in development mode, ensure that your development endpoints are publicly accessible and that all security certificates are valid.

If the issue persists, I would recommend checking 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
Unable to link Alexa skill with my mobile application in AWS (Dev mode testing) | AWS re:Post

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.