Jovo4 Alexa account linking

amazon-alexa
v4

#1

Hi, I’m trying to send ‘LinkAccount’ card from the handler.

    return jovo.$send({
        message: 'Please link your account.',
        platforms: {
          alexa: {
            card: {
                type: 'LinkAccount'
            },
            nativeResponse: {
                card: {
                    type: 'LinkAccount'
                },
            }
          },
        },
      });   

But, I’m not seeing the card in the final response is not seen.

Jovo Debugger:

Alexa Test console log:

Did I miss something? Thanks


#2

The contents of the nativeResponse property need to be added in exactly the same way as they show up in the Alexa response JSON. Learn more here: https://www.jovo.tech/marketplace/platform-alexa/output#native-response

In your example, you’re missing a response property (I know it’s a bit confusing, but Alexa has a response property as part of their response JSON structure):

{
  platforms: {
    alexa: {
      response: {
         // ...
      }
    }
  }
}

#3

Thanks @jan. That worked


#4

Hi!
Can you post the sample code of how it turned out?


#5
this.$send({
    message: 'Please link your account.',
    platforms: {
      alexa: {
        nativeResponse: {
            response: {
                card: {
                    type: 'LinkAccount'
                },
            }
        }
      },
    },
});

Hope this is helpful.