Alexa.Launcher Interface 3
Implement the Alexa.Launcher interface in your Alexa skill so that users can request Alexa to launch a specified app, such as Prime Video, or invoke a UI shortcut, such as TV display settings. For details about predefined apps and shortcuts, see Launch Target Reference.
For the list of languages that the Alexa.Launcher interface supports, see List of Alexa Interfaces and Supported Languages. For the definitions of the message properties, see Alexa Interface Message and Property Reference.
Utterances
The Alexa.Launcher interface uses the pre-built voice interaction model. After the user says one of the following utterances, Alexa sends a corresponding directive to your skill.
The following examples show some user utterances:
أليكسا، شغّلي نتفليكس
أليكسا، روحي للصفحة الرئيسيّة
أليكسا، روحي للإعدادات
أليكسا، برايم فيديو.
أليكسا، الإعدادات.
Alexa, launch Netflix.
Alexa, go home.
Alexa, go to settings.
Alexa, Prime Video.
Alexa, settings.
Alexa, lance netflix.
Alexa, retourne à l'écran d'accueil.
Alexa, va sur profils.
Alexa, Prime Video.
Alexa, paramètres.
Alexa, starte netflix.
Alexa, gehe zum start bildschirm.
Alexa, gehe zu display einstellungen.
Alexa, Prime Video.
Alexa, Einstellungen.
Alexa, netflix खोलो
Alexa, home पर जाओ/जाना/जाइए/चलो/चलना
Alexa, settings पर जाओ
Alexa, प्राइम वीडियो
Alexa, सेटिंग्स।
Alexa, apri netflix.
Alexa, vai alla home.
Alexa, vai su impostazioni.
Alexa, PrimeVideo.
Alexa, impostazioni.
アレクサ、ユーチューブを起動して
アレクサ、予約録画に行って
アレクサ、スクリーン設定に行って
アレクサ、プライムビデオ
アレクサ、設定
Alexa, abrir netflix.
Alexa, ir para a página principal.
Alexa, vá para configuração.
Alexa, Prime Video.
Alexa, configurações.
Alexa, ajustes.
Alexa, lanza netflix.
Alexa, página inicial.
Alexa, abre configuración.
Alexa, Prime Video.
Alexa, configuración.
Alexa, start Netflix.
Alexa, ga naar home.
Alexa, ga naar instellingen.
Alexa, Prime Video.
Alexa, instellingen.
Properties and objects
The Alexa.Launcher interface includes the following properties and objects.
Reportable properties
The Alexa.Launcher interface uses the target property as the primary property. You identify that you support the property in your discovery response.
Target object
The Target object contains a name and identifier that represents a predefined application or UI shortcut.
The following example shows a predefined application target.
{
"name": "target",
"value": {
"name": "Prime Video",
"identifier": "amzn1.alexa-ask-target.app.72095"
}
}
The following table shows the definition of the Target object.
| Property | Description | Type | Required |
|---|---|---|---|
|
|
Name of the application or UI shortcut. |
String |
Yes |
|
|
Identifier associated with the application or UI shortcut. |
String |
Yes |
Discovery
You describe endpoints that support Alexa.Launcher by using the standard discovery mechanism described in Alexa.Discovery.
Set retrievable to true for the properties that you report when Alexa sends your skill a state report request.
Set proactivelyReported to true for the properties that you proactively report to Alexa in a change report.
Use TV, STREAMING_DEVICE, GAME_CONSOLE, or another appropriate display category. For the full list of display categories, see display categories.
Discover response example
The following example shows an Alexa.Discover.Response message for a device that can launch apps and shortcuts.
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "Discover.Response",
"payloadVersion": "3",
"messageId": "Unique identifier, preferably a version 4 UUID"
},
"payload": {
"endpoints": [{
"endpointId": "Unique ID of the endpoint",
"manufacturerName": "Manufacturer of the endpoint",
"description": "Description to be shown in the Alexa app",
"friendlyName": "Living Room TV",
"displayCategories": ["TV"],
"additionalAttributes": {
"manufacturer": "Manufacturer of the endpoint",
"model": "Model of the device",
"serialNumber": "Serial number of the device",
"firmwareVersion": "Firmware version of the device",
"softwareVersion": "Software version of the device"
},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.Launcher",
"version": "3",
"properties": {
"supported": [{
"name": "target"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}]
}
}
}
Proactive Discovery with AddOrUpdateReport
When a user adds a new endpoint to their account or makes changes to an existing endpoint, you must send an Alexa.Discovery.AddOrUpdateReport message proactively to the Alexa event gateway. You can include all the endpoints associated with the user account, or only the new or updated endpoints. You can choose based on your skill implementation. For details, see AddOrUpdateReport.
AddOrUpdateReport example
The following example shows a AddOrUpdateReport message for a new endpoint.
{
"event": {
"header": {
"namespace": "Alexa.Discovery",
"name": "AddOrUpdateReport",
"payloadVersion": "3",
"messageId": "Unique identifier, preferably a version 4 UUID"
},
"payload": {
"endpoints": [{
"endpointId": "unique ID of the new endpoint",
"manufacturerName": "Manufacturer of the endpoint",
"description": "Description to be shown in the Alexa app",
"friendlyName": "Living Room TV",
"displayCategories": ["TV"],
"additionalAttributes": {
"manufacturer": "Manufacturer of the endpoint",
"model": "Model of the device",
"serialNumber": "Serial number of the device",
"firmwareVersion": "Firmware version of the device",
"softwareVersion": "Software version of the device"
},
"capabilities": [{
"type": "AlexaInterface",
"interface": "Alexa.Launcher",
"version": "3",
"properties": {
"supported": [{
"name": "target"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa.EndpointHealth",
"version": "3.1",
"properties": {
"supported": [{
"name": "connectivity"
}],
"proactivelyReported": true,
"retrievable": true
}
},
{
"type": "AlexaInterface",
"interface": "Alexa",
"version": "3"
}
]
}],
"scope": {
"type": "BearerToken",
"token": "access-token-from-Amazon"
}
}
}
}
Directives
Alexa sends the following Alexa.Launcher interface directives to your skill.
LaunchTarget directive
Support the LaunchTarget directive so that users can request to launch a specified app or shortcut. Alexa matches the app or shortcut named by the user to an identifier in the predefined launch target list, and then sends the name and identifier in the request.
LaunchTarget directive example
After the user says, "Alexa, launch Prime Video," Alexa sends the following directive to your skill.
{
"directive": {
"header": {
"namespace": "Alexa.Launcher",
"name": "LaunchTarget",
"messageId": "Unique version 4 UUID",
"correlationToken": "Opaque correlation token",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0 bearer token"
},
"endpointId": "Endpoint id",
"cookie": {}
},
"payload": {
"name": "Prime Video",
"identifier": "amzn1.alexa-ask-target.app.72095"
}
}
}
}
LaunchTarget directive payload
The following table shows the payload details for the LaunchTarget directive.
| Property | Description | Type | Required |
|---|---|---|---|
|
|
Name of the app or shortcut. |
String |
Yes |
|
|
Identifier associated with the application or shortcut. |
String |
Yes |
LaunchTarget response
If you handle a LaunchTarget directive successfully, respond with an Alexa.Response event. Include the values of the target property in the context object.
{
"event": {
"header": {
"namespace": "Alexa",
"name": "Response",
"messageId": "Unique identifier, preferably a version 4 UUID",
"correlationToken": "Opaque correlation token that matches the request",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "Endpoint id"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.Launcher",
"name": "target",
"value": {
"name": "Prime Video",
"identifier": "amzn1.alexa-ask-target.app.72095"
},
"timeOfSample": "2021-12-01T18:20:00.00Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2021-12-01T18:00:00.00Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
LaunchTarget error handling
If you can't handle a LaunchTarget directive successfully and the error is specific to video, respond with an Alexa.Video.ErrorResponse event. For general errors, respond with a generic Alexa.ErrorResponse event.
State reporting
Alexa sends an Alexa.ReportState directive to request information about the state of an endpoint. You send an Alexa.StateReport event in response. The response contains the current state of all the retrievable properties in the context object. You identify your retrievable properties in your discovery response. For details about state reports, see State Reporting for Video Skills.
StateReport response example
{
"event": {
"header": {
"namespace": "Alexa",
"name": "StateReport",
"messageId": "Unique identifier, preferably a version 4 UUID",
"correlationToken": "Opaque correlation token that matches the request",
"payloadVersion": "3"
},
"endpoint": {
"endpointId": "endpoint id"
},
"payload": {}
},
"context": {
"properties": [
{
"namespace": "Alexa.Launcher",
"name": "target",
"value": {
"name": "Prime Video",
"identifier": "amzn1.alexa-ask-target.app.72095"
},
"timeOfSample": "2021-12-01T18:20:00.00Z",
"uncertaintyInMilliseconds": 500
},
{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2021-12-01T18:00:00.00Z",
"uncertaintyInMilliseconds": 0
}
]
}
}
Change reporting
You send an Alexa.ChangeReport event to report changes proactively in the state of an endpoint. You identify the properties that you proactively report in your discovery response.
If a state change happens because of a directive from Alexa, you send both a directive response and a change report event. For details about change reports, see State Reporting for Video Skills.
ChangeReport event example
The following example shows that the target changed to a shortcut due to a user request. For details about the target property, see Reportable properties.
{
"event": {
"header": {
"namespace": "Alexa",
"name": "ChangeReport",
"messageId": "Unique identifier, preferably a version 4 UUID",
"payloadVersion": "3"
},
"endpoint": {
"scope": {
"type": "BearerToken",
"token": "OAuth2.0 bearer token"
},
"endpointId": "endpoint id"
},
"payload": {
"change": {
"cause": {
"type": "VOICE_INTERACTION"
},
"properties": [
{
"namespace": "Alexa.Launcher",
"name": "target",
"value": {
"name": "Settings",
"identifier": "amzn1.alexa-ask-target.shortcut.07395"
},
"timeOfSample": "2021-12-01T18:10:50Z",
"uncertaintyInMilliseconds": 500
}
]
}
}
},
"context": {
"properties": [{
"namespace": "Alexa.EndpointHealth",
"name": "connectivity",
"value": {
"value": "OK"
},
"timeOfSample": "2021-12-01T18:00:50Z",
"uncertaintyInMilliseconds": 0
}]
}
}
Related topics
Last updated: Aug 23, 2024