-
Notifications
You must be signed in to change notification settings - Fork 6
Show device address permission request card
Sri Vishnu Totakura edited this page Jun 24, 2018
·
4 revisions
From within the intent handler, return the special permission consent response instead of the usual response
object
module Alexa
module IntentHandlers
class MyIntent < Alexa::IntentHandlers::Base
def handle
return Alexa::Responses::PermissionConsents::DeviceAddress.new(intent: self)
end
end
end
end
This automatically returns the card for permissions' consent in your response but not the speech.
Add speech to the response by adding the speech file (permission_consents/device_address.ssml.erb
) under the intent handler's views directory for the intent from which the response is returned.
# app/views/alexa/de_de/intent_handlers/my_intent/permission_consents/device_address.ssml.erb
<speak>
Please give permissions to get your device address.
</speak>