2
votes

We have configured a/c linking for our Alexa custom skills with "Authorization Code Grant" option. Linking works fine but just wanted to clarify few things -

1) In a/c linking setup we have an option "Default Access Token Expiration Time". Does Alexa automatically refresh access token with the specified interval here?

2) If I have done my a/c linking and after that remain idle i.e. not using my Alexa device for long duration(2 weeks). Will it still keep refreshing my token on specified interval or its only done when we are using the setup?

3) While refreshing token, I think Alexa expect response within 4.5s from authorization server. In case authorization server is down for some reason while it tries to refresh token, will it keeps trying until new access token is received or it will stop after few retry?

Any inputs on above would be appreciated.

2

2 Answers

2
votes
  1. No, Alexa does not automatically refresh access token but only when user accesses your skill and the access_token is expired and has refresh_token. Also, value specified here in Default Access Token Expiration Time is used if identity provider does not return expires_in.

  2. Only when user accesses your skill and the access_token is expired and has refresh_token.

  3. Yes, as long as refresh_token was supplied earlier and user hasn’t disabled and re-enabled your skill.

0
votes

Google only: As a result of Google's oauth architecture the refresh_token is only provided the first time a user authorizes. If you authorize many times on the same account (for example, while testing) that specific account won't return a refresh_token, so when our service requests one, none is returned. It's also possible you haven't set access_type=offline when making the query from google, which means you are not requesting the refresh token. To fix any specific account to work with refresh tokens go to https://www.google.com/settings/u/1/security and revoke access from your app. Then the next time you authenticate it will treat it as a first time authentication, and the skill should refresh properly again.

From https://forums.developer.amazon.com/articles/38610/alexa-debugging-account-linking.html