Amazon Alexa

Push.Delivery offers the possibility to send push notifications to Amazon Alexa devices via Alexa skill messaging

For that it is necessary to connect the Amazon Alexa Skill with the push system.

Required information

  • Client ID

  • Client Secret

You can find these within your alexa developer console under Permissions→ Alexa Skill Messaging

alexa developer tabs
alexa developer credentials

Setup in Admin UI

Please go into the "Apps" tab and add a new App.

Give your App a name, e.g. "My Alexa App".

Then select the platform "Alexa".

Upload an icon for the channel. This is only used inside the Push Admin so that you easier can recognize the channels by image.

Also it is required to use a Push template. This template is used to define the information that will be sent with the Amazon Alexa Push.

At the end you will be asked for your:

  • Client ID

  • Client Secret

After successfully creating the App for Amazon Alexa the following information will be automatically shown inside the App:

  • ApiUser: This is the API username.

  • Password: This is the password for the API user.

  • AccessToken: Instead of using username and password an Acess Token is created.

  • platformId: The platform ID.

  • AppId: The App ID.

add alexa app

After setting up the App now it is time to create Tags that users can subscribe for.

Subscribing for Push

From the alexa skill, pushes should be subscribed via subscription API. The "userId" (the ID of the skill user) need to be used as "deviceId".

Template and Payloads

Sample template:

[
  {
    "operation": "shift",
    "spec": {
      "title": "data.title",
      "message": "data.message"
    }
  },
  {
    "operation": "default",
    "spec": {
      "expiresAfterSeconds": 86400
    }
  }
]
To learn more about how to create and modify JOLT templates please follow up in our developer documentation: push-templates

Sample incoming payload:

{
   "articleID":"22357489",
   "title":"Kretschmann steigt aus Wahlkampf in Baden-Württemberg aus",
   "pubdate":"2021-02-12T12:23:20+0100",
   "message":"Als Grund nennt der Ministerpräsident eine Krebserkrankung seiner Frau. Am 14. März wird in Baden-Württemberg ein neuer Landtag gewählt."
}

Sample outgoing payload:

{
   "expiresAfterSeconds":86400,
   "data":{
      "message":"Als Grund nennt der Ministerpräsident eine Krebserkrankung seiner Frau. Am 14. März wird in Baden-Württemberg ein neuer Landtag gewählt.",
      "title":"Kretschmann steigt aus Wahlkampf in Baden-Württemberg aus"
   }
}

Message Object:

Parameter

Type

Description

Required

data

JSON

The payload fields and will be based on alexa skill

Required

expiresAfterSeconds

integer

System defined field defines time in milliseconds after which the message will be expired.

Optional