Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display a Hyperlink in alexa skill

Is there any method possible to display a hyperlink like "read more" in Alexa skill? I am trying to display a hyperlink in my custom Alexa skill but could not find any method to implement it

like image 587
Shivanshu Garg Avatar asked Dec 03 '25 09:12

Shivanshu Garg


1 Answers

Hyperlinks are now available as part of an APL directive for devices that support it. You can read the documentation here:

OpenURL Command

The OpenURL command, if successful, opens the specified URL in a web browser or other application on the device. You must provide a suitable URL that works on the current device.

They give an example:

{
  "type": "OpenURL",
  "source": "https://www.amazon.com/",
  "onFail": {
    "type": "SetValue",
    "componentId": "errorText",
    "property": "text",
    "value": "Unable to open Amazon.com (${event.source.value})"
  }
}

Description about supported devices:

Not all devices support opening a URL. If the device does not support opening URLs, the command is ignored and it does not run onFail commands. Check the value of the allowOpenURL in the data-binding context to determine if OpenURL is supported on the device.

like image 80
Josh Broadhurst Avatar answered Dec 08 '25 21:12

Josh Broadhurst