I am unable to invoke the voice-forward dialogue where Alexa asks the user to grant permissions to the postal code of their devices via voice instead of pushing the user to the app.
Instead I get the non-voice-forward response: "To continue, please visit your Alexa app to give (skill name) the permissions".
This is a US/UK/CA skill. I have set "Country/Region & Postal Code Only" in the Permissions section of the skill in the Console. I am using the Python SDK.
I am calling the connections directive thus:
return handler_input.response_builder.add_directive(
StartConnectionDirective(
uri="connection://AMAZON.AskForPermissionsConsent/2",
input={
'@type':'AskForPermissionsConsentRequest',
'@version':'2',
'permissionScopes': [
{
'permissionScope': 'alexa:devices:all:address:country_and_postal_code:read',
'consentLevel': 'ACCOUNT'
}
]
},
token="correlationToken"
)
).response
And in my handler for the response, I get this value in handler_input.request_envelope.request.cause when permissions are not granted:
{
'object_type': 'ConnectionCompleted',
'result': {
'permissionScopes': [
{'consentLevel': 'ACCOUNT',
'permissionScope': 'alexa:devices:all:address:country_and_postal_code:read'}
],
'status': 'REDIRECT_TO_APP'
},
'status': {'code': '200', 'message': 'Ok'},
'token': 'correlationToken'
}
Why is this?