Alexa.Launcher Interface

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.

Utterances

The Alexa.Launcher interface uses the pre-built voice interaction model. 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 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

Name of the application or UI shortcut.

String

Yes

identifier

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.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "Discover.Response",
            "payloadVersion": "3",
            "messageId": "a unique identifier, preferably a version 4 UUID"
        },
        "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"
                    }
                ]
            }]
        }
    }
}

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.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa.Discovery",
            "name": "AddOrUpdateReport",
            "payloadVersion": "3",
            "messageId": "a unique identifier, preferably a version 4 UUID"
        },
        "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 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": "a unique identifier, preferably a version 4 UUID",
            "correlationToken": "an opaque correlation token",
            "payloadVersion": "3"
        },
        "endpoint": {
            "scope": {
                "type": "BearerToken",
                "token": "an OAuth2 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

Name of the application or shortcut.

String

Yes

identifier

Identifier associated with the application or shortcut.
To enable you to distinguish between application and shortcut identifiers, predefined identifier strings contain the substrings, app and shortcut. For the complete list of predefined identifiers, see Launch Target Reference.

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.

Copied to clipboard.

{
    "event": {
        "header": {
            "namespace": "Alexa",
            "name": "Response",
            "messageId": "a unique identifier, preferably a version 4 UUID",
            "correlationToken": "an 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:50Z",
                "uncertaintyInMilliseconds": 500
            },
            {
                "namespace": "Alexa.EndpointHealth",
                "name": "connectivity",
                "value": {
                    "value": "OK"
                },
                "timeOfSample": "2021-12-01T18:20:50Z",
                "uncertaintyInMilliseconds": 0
            }
        ]
    }
}

LaunchTarget error handling

If you can't handle a 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 example

Copied to clipboard.

{
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "StateReport",
      "messageId": "a unique identifier, preferably a version 4 UUID",
      "correlationToken": "an 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: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 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.

Copied to clipboard.

{  
  "event": {
    "header": {
      "namespace": "Alexa",
      "name": "ChangeReport",
      "messageId": "a unique identifier, preferably a version 4 UUID",
      "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
      }]
  }
}