Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

279
Vistas
Alexa - How to send image to user?

I'm using a Lambda function for my Alexa Skill. For my launch intent, I query DynamoDB and return a String that I first want to convert into a QRCode and then I want to return it to the Alexa Device as an Image inside the responseBuilder

Alexa works fine displaying images from external urls such as

const rabbitImage = "https://i.imgur.com/U6eF0oH.jpeg";

return responseBuilder
        .speak(say)
        .withStandardCard("Welcome to Alexa", "description", rabbitImage, rabbitImage)
        .reprompt('try again, ' + say)
        .getResponse();

But I'm stuck on how to send the QRCode back to the Alexa Device in the responseBuilder.

I'm using a nodejs library called qrcode that can convert the String into a QRCode and then into base64.

https://www.npmjs.com/package/qrcode

But according to the Alexa docs for sending a "card" aka image, back to the user it has to be a url.

https://developer.amazon.com/en-US/docs/alexa/custom-skills/include-a-card-in-your-skills-response.html

The Alexa Skills Kit provides different types of cards:

A Standard card also displays plain text, but can include an image. You provide the text for the title and content, and the URL for the image to display.

So I'm not sure if the base64 generated by the qrcode library would work in this case.

What's the best way to send the dynamically generated QRCode back to the Alexa Device as a response in this scenario?

const LaunchRequest_Handler = {
    canHandle(handlerInput) {
      const request = handlerInput.requestEnvelope.request;
      return request.type === 'LaunchRequest';
    },
    handle(handlerInput) {
      const responseBuilder = handlerInput.responseBuilder;


      //Perform query to DynamoDB

      var stringToCreateQRWith = "8306e21d-0c9e-4465-91e9-0cf86fca110d";

      //Generate qr code and send back to user here
      //???Unsure how to do and what format to send it in
      var qrImageToSendToUser = ???

      return responseBuilder
        .speak(say)
        .withStandardCard("Welcome to Alexa", "description", qrImageToSendToUser , qrImageToSendToUser )
        .reprompt('try again, ' + say)
        .getResponse();

    }

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

As @kopaka proposed, this is the way to go. There is no way around it.

As per the documentation

They are a few thing you need to have in mind.

On the images itself, you will want to create 2 images with 720px x 480px and 1200px x 800px. To make sure they display nicely on multiple screen size. Otherwise they do not guarantee the best experience for your user, as they may scale up/down the image to fit.

On the storage choice, you need to make sure to be able to serve those images via Https and with a valid ssl certificate trusted by amazon.

over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda