Carga útil para el archivo adjunto «video»
Clave | Tipo | Descripción |
|---|---|---|
|
| URL del video |
Ejemplo:
{
"message": {
"attachment": {
"type": "video",
"payload": {
"url": "http://url_or_the_video"
}
}
}
}Carga útil para el archivo adjunto «image»
Clave | Tipo | Descripción |
|---|---|---|
| URL de la imagen | |
|
| Texto que se mostrará o leerá si no se puede cargar la imagen |
Ejemplo:
{
"message": {
"attachment": {
"type": "image",
"payload": {
"url": "http://url_or_the_image",
"alt_text": "http://url_or_the_image",
}
}
}
}Carga útil para el archivo adjunto «template»
Clave | Tipo | Descripción |
|---|---|---|
|
| Tipo de plantilla. Los valores posibles son «generic» y «list». |
|
| Una lista de |
Elementos:
Clave | Tipo | Descripción |
|---|---|---|
|
| Título del elemento |
|
| Subtítulo del elemento |
|
| URL de la imagen del elemento |
|
| Lista de botones asociados al elemento |
|
| Título del botón |
|
| Tipo de botón. Puede ser «web_url» (botón que redirige a un sitio web) o «postback» (respuesta rápida que se envía a la conversación con el chatbot) |
|
| Enlace del sitio web al que se redirige para «web_url». Carga útil que se enviará como respuesta rápida para «postback». |
Ejemplo:
{
"message": {
"attachment": {
"type": "template",
"payload": {
"template_type": "list",
"elements": [
{
"title": "Title Element 1",
"subtitle": "Subtitle Element 1",
"image_url": "http://url_or_the_image",
"buttons": [
{
"title": "Button",
"type": "web_url",
"payload": "http://link_to_redirect_to"
}
]
},
{
"title": "Title element 2",
"subtitle": "Subtitle element 2",
"image_url": "http://url_or_the_image",
},
{
"title": "Title element 3",
"subtitle": "Subtitle element 3",
"image_url": "http://url_or_the_image"
}
]
}
}
}
}