question

ironman_bby avatar image
ironman_bby asked

Refresh Token expired. How to respond ? How to force user to re login in Smart Home Skills ?

Access Token & Refresh Token for the user got expired. How to force user to re login in Smart Home Skills ? Also specify how to respond in V2 & V3

alexa smart homehow-toaccount linking
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ironman_bby avatar image
ironman_bby answered

Hi @Jenn@amazon , Alexa.ErrorResponse requires messageId, correlationToken & endpointId. In our case, we receive expired refreshToken when Alexa calls the ACCESS TOKEN URI we configured in the SKILLS CONFIGURATION page. We do not get the messageId, correlationToken, endpointId as it is TOKEN URI. Right ?

In what format we need to respond during refreshToken expiry, so that user will be forced to login again ?

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

The Request will still contain the standard payload. It's up to the Skill's logic to verify a valid access token and return the Alexa.ErrorResponse Response.

0 Likes 0 ·
Jenn@amazon avatar image
Jenn@amazon answered

For v3, the skill should return an Alexa.ErrorResponse with the error type:

INVALID_AUTHORIZATION_CREDENTIAL

For v2, the skill returns back an Alexa.ConnectedHome.Control response:

ExpiredAccessTokenError

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ironman_bby avatar image
ironman_bby answered
@Jenn@amazon

could you please help us in this..

10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.