question

knighttimem avatar image
knighttimem asked

Possible to unlink account with code/request?

So I'm trying to implement a feature on a skill that would cause the user to have to re-link their account through the account linking page if they fail to provide the necessary pin after a few consecutive tries. I have the attempts tracked by session attributes, so that's working fine. But how would I go about causing the account link to "break" or essentially disable the skill so the user has to enable and/or sign back in with their credentials in the Alexa app? To clarify, the skill I'm working on is using a PHP-based web service to authenticate the user (hosted in a separate file) and also uses PHP to examine the service request and send a response back.

account linkingaccount information
10 |5000 characters needed characters left characters exceeded

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

knighttimem avatar image
knighttimem answered

Reading through the documentation, I found this:

If the user disables the skill in the Alexa app, the Alexa service deletes the access token (and refresh token if applicable) associated with that user and skill. This essentially removes the link between the user’s Alexa account and their account in your service.

So I guess the real question is, can the access token sent in the service request JSON, be deleted, cleared out or changed to null when sending the service response JSON back?

10 |5000 characters needed characters left characters exceeded

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

KirkC@Amazon avatar image
KirkC@Amazon answered

Hello knighttimem. I definitely understand the potential utility of such a feature. Currently though such a feature is not supported. I have however forwarded this scenario to our development team for consideration as a feature request.

10 |5000 characters needed characters left characters exceeded

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

Levon@Amazon avatar image
Levon@Amazon answered

Thansk knighttimem -- it's a great feature request. Please feel free to submit it here in the forum as an idea. For that click 'Spaces' on the top right of the nav menu, then 'Alexa Feature Requests', after that 'Create' and 'Post an idea', or just follow this link: https://forums.developer.amazon.com/content/idea/post.html?space=185

Thanks!

1 comment
10 |5000 characters needed characters left characters exceeded

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

It would also be great if the skill service gets a callback when the an account is un-linked (if in future the Alexa app allows users to unlink accounts for a skill)

0 Likes 0 ·
newuser-752be110-4ba8-471c-80be-00b5496519d6 avatar image
newuser-752be110-4ba8-471c-80be-00b5496519d6 answered

Hi! Has this feature been added since the question was asked 2-ish years ago?

10 |5000 characters needed characters left characters exceeded

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