question

Harlee Dane Basilio avatar image
Harlee Dane Basilio asked

Is there a way to send a message to a user from a 3rd party app via an API endpoint?

Is there a way to send a message to a user from a 3rd party app via an API endpoint?
Sample use case is when we want the user to check the skill as there is an additional information added to their profile.

user experience
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Andy Whitworth avatar image
Andy Whitworth answered

The closest you can get to this is to use Alexa Proactive Events. This allows you to send a notification to an Alexa device. However! The notification speech is fixed to a defined set of schema, perhaps the closest you'll get is the Message Alert schema https://developer.amazon.com/en-US/docs/alexa/smapi/schemas-for-proactive-events.html#message-alert

In order to get all this working from an external application then you'll need to call the Alexa Proactive Events API. You will need the Alexa userId of each user you want to send the message to (or you can broadcast to all subscribed users).

https://developer.amazon.com/en-US/docs/alexa/smapi/proactive-events-api.html

And some sample code to send a Proactive Event from node (Python example also available)

https://developer.amazon.com/en-US/docs/alexa/alexa-skills-kit-sdk-for-nodejs/call-alexa-service-apis-out-of-session.html#code-sample

The notification will cause the Alexa device to emit a notification tone and pulse the glow ring. The user then has to ask "Alexa, read notifications" to get the actual notification speech.

That's all I can think of.


5 comments
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Harlee Dane Basilio avatar image Harlee Dane Basilio commented ·
I have tried proactive but it does not contain enough information.

Is there a way to create custom proactive schema?
Or at least add a hint to a proactive event on what the invocation for the skill is in order to view their message?

example: You have one new unread message from ENTITY. Please say "Skill invocation" to view the message.

0 Likes 0 ·
Andy Whitworth avatar image Andy Whitworth Harlee Dane Basilio commented ·
No, the fixed set of schema is all you have.
0 Likes 0 ·
Harlee Dane Basilio avatar image Harlee Dane Basilio Andy Whitworth commented ·

Oh. okay.

How about messaging the user? Is there a way to send a user message via an API?
0 Likes 0 ·
Show more comments