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".

Customize Payload

Default template:

[
  {
    "operation": "shift",
    "spec": {
      "title": "data.title",
      "message": "data.message"
    }
  },
  {
    "operation": "default",
    "spec": {
      "expiresAfterSeconds": 86400
    }
  }
]

Default payload before transformation:

{
   "title":"Default Title",
   "message":"This is the default message"
}

Default payload after transformation:

{
   "expiresAfterSeconds":86400,
   "data":{
      "message":"This is the default message",
      "title":"Default Title"
   }
}

Message Object:

Parameter

Type

Description

Required

Defaults

Comments

data

JSON

The payload data to send with the message. The data must be in the form of JSON-formatted key-value pairs. Both keys and values must be of type String. The payload fields will be based on alexa skill.

Required

-

If the message does not include payload data, you can pass in an empty object, such as "data":{}

expiresAfterSeconds

integer

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

Optional

3600

To learn more about how to create and modify JOLT templates please follow up in our developer documentation: push-templates