Alexa.Launcher Interface

Implement the Alexa.Launcher interface in your Alexa skill so that users can request Alexa to launch a specified application, such as Prime Video, or invoke a UI shortcut, such as TV display settings. For the list of predefined application and UI shortcut targets, see the Launch Target Reference.

For the list of locales that the Alexa.Launcher interface supports, see List of Capability Interfaces and Supported Locales.

Utterances

When you use the Alexa.Launcher interface, the voice interaction model is already built for you. After the customer says one of the following utterances, Alexa sends a corresponding directive to your skill.

The following examples show some customer utterances:

Alexa, launch Prime Video.
Alexa, go home.
Alexa, go to settings.
Alexa, Prime Video. (For one-to-one paired devices.)
Alexa, settings. (For one-to-one paired devices.)

Properties

The Alexa.Launcher interface uses the target property as the primary property. You identify that you support the property in your discovery response.

Example target property

{
  "name": "target",
  "value": {
      "name": "Prime Video",
      "identifier": "amzn1.alexa-ask-target.app.72095"
    }
}

Target object

The Target object contains a name and identifier that represents a predefined launch target, such as a UI shortcut or application. The following table shows the definition of the Target object.

Property Description Type Required

name

Name of the application or shortcut.

String

Yes

identifier

Identifier associated with the application or shortcut. If the identifier contains "app", the target is an application. If the identifier contains "shortcut", the target is a shortcut. For the complete list of identifiers see the Launch Target Reference.

String

Yes

Discovery

You describe endpoints that support Alexa.Launcher 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. For more details on State Reporting, see State Reporting for Video Skills.

Use TV for the display category. For the full list of display categories, see display categories.

Discover response examples

The following example shows a Discover.Response message for a device that can launch application and shortcuts with the Alexa.Launcher.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "Discover.Response",
            "payloadVersion": "3",
            "messageId": "<message id>"
        },
        "payload": {
            "endpoints": [{
                "endpointId": "unique ID of the endpoint",
                "manufacturerName": "the manufacturer name of the endpoint",
                "description": "a description that is shown in the Alexa app",
                "friendlyName": "Living Room TV",
                "displayCategories": ["TV"],
                "additionalAttributes": {
                    "manufacturer": "the manufacturer name of the endpoint",
                    "model": "the model of the device",
                    "serialNumber": "the serial number of the device",
                    "firmwareVersion": "the firmware version of the device",
                    "softwareVersion": "the 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.2",
                        "properties": {
                            "supported": [{
                                "name": "connectivity"
                            }],
                            "proactivelyReported": true,
                            "retrievable": true
                        }
                    },
                    {
                        "type": "AlexaInterface",
                        "interface": "Alexa",
                        "version": "3"
                    }
                ]
            }]
        }
    }
}

AddOrUpdateReport

You must proactively send an Alexa.Discovery.AddOrUpdateReport message when a user adds a new endpoint to their account, or makes changes to an existing endpoint, such as renaming a scene. Send your Alexa.Discovery.AddOrUpdateReport message 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.

Discover response examples

The following example shows a AddOrUpdateReport message for a new endpoint.

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa.Discovery",
      "name": "AddOrUpdateReport",
      "payloadVersion": "3",
      "messageId": "<message id>"
    },
    "payload": {
      "endpoints": [
        {
          "endpointId": "unique ID of the new endpoint",
          "manufacturerName": "the manufacturer name of the endpoint",
          "description": "a description that is shown in the Alexa app",
          "friendlyName": "Living Room TV",
          "displayCategories": ["TV"],
          "additionalAttributes":  {
            "manufacturer": "the manufacturer name of the endpoint",
            "model" : "the model of the device",
            "serialNumber": "the serial number of the device",
            "firmwareVersion" : "the firmware version of the device",
            "softwareVersion": "the 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.2",
                "properties": {
                    "supported": [{
                        "name": "connectivity"
                    }],
                    "proactivelyReported": true,
                    "retrievable": true
                }
            },
            {
              "type": "AlexaInterface",
              "interface": "Alexa",
              "version": "3"
            }
          ]
        }
      ],
      "scope": {
        "type": "BearerToken",
        "token": "access-token-from-Amazon"
      }
    }
  }
}

Directives

LaunchTarget directive

Support the LaunchTarget directive so that users can request to launch a specified application or shortcut. Alexa matches the application 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. If the identifier contains "app", the target is an application. If the identifier contains "shortcut", the target is a shortcut. For details about these parameters, see the target object definition.

LaunchTarget directive example

After the user says, "Alexa, launch Prime Video", Alexa sends the following directive to your skill.

{
    "directive": {
        "header": {
            "correlationToken": "dFMb0z+PgpgdDmluhJ1LddFvSqZ/jCc8pt90jSqg==",
            "messageId": "abc-123-def-456",
            "name": "LaunchTarget",
            "namespace": "Alexa.Launcher",
            "payloadVersion": "3"
        },
        "endpoint": {
            "scope": {
                "type": "BearerToken",
                "token": "some-access-token"
            },
            "endpointId": "endpoint-001",
            "cookie": {}
        },
        "payload": {
            "name": "Prime Video",
            "identifier": "amzn1.alexa-ask-target.app.72095"
        }
    }
}

LaunchTarget response

If you handle an LaunchTarget directive successfully, respond with an Alexa.Response event. Include the values of the target property in the context object.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa",
            "name": "Response",
            "messageId": "message id",
            "correlationToken": "correlation token received in 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:50Z",
                "uncertaintyInMilliseconds": 500
            },
            {
                "namespace": "Alexa.EndpointHealth",
                "name": "connectivity",
                "value": {
                    "value": "OK"
                },
                "timeOfSample": "2021-12-01T18:20:50Z",
                "uncertaintyInMilliseconds": 0
            }
        ]
    }
}

LaunchTarget directive error handling

If you can't handle an LaunchTarget directive successfully, respond with an Alexa.Video.ErrorResponse event. You can also respond with a generic Alexa.ErrorResponse event if your error isn't specific to video.

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 event example

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "messageId": "<message id>",
      "correlationToken": "<an opaque correlation token>",
      "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:50Z",
                "uncertaintyInMilliseconds": 500
            },
            {
                "namespace": "Alexa.EndpointHealth",
                "name": "connectivity",
                "value": {
                    "value": "OK"
                },
                "timeOfSample": "2021-12-01T18:20:50Z",
                "uncertaintyInMilliseconds": 0
            }
    ]
  }
}

Change reporting

You send an Alexa.ChangeReport event to proactively report changes 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 the Properties.

Copied to clipboard.

{  
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "ChangeReport",
      "messageId": "<message id>",
      "payloadVersion": "3"
    },
    "endpoint": {
      "scope": {
        "type": "BearerToken",
        "token": "<an OAuth2 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:20:50Z",
                    "uncertaintyInMilliseconds": 500
                }
        ]
      }
    }
  },
  "context": {
      "properties": [{
          "namespace": "Alexa.EndpointHealth",
          "name": "connectivity",
          "value": {
              "value": "OK"
          },
          "timeOfSample": "2021-12-01T18:20:50Z",
          "uncertaintyInMilliseconds": 0
      }]
  }
}