I am implementing proactive events in my project. I have checked the proactive events jovo tutorials
my project.js looks like
module.exports = {
alexaSkill: {
nlu: 'alexa',
manifest: {
permissions: [
{
name: 'alexa::devices:all:notifications:write'
}
],
events: {
publications: [
{
eventName: 'AMAZON.WeatherAlert.Activated'
},
{
eventName: 'AMAZON.SportsEvent.Updated'
},
{
eventName: 'AMAZON.MessageAlert.Activated'
},
{
eventName: 'AMAZON.OrderStatus.Updated'
},
{
eventName: 'AMAZON.Occasion.Updated'
},
{
eventName: 'AMAZON.TrashCollectionAlert.Activated'
},
{
eventName: 'AMAZON.MediaContent.Available'
},
{
eventName: 'AMAZON.SocialGameInvite.Available'
}
],
}
}
},
googleAction: {
nlu: 'dialogflow',
},
endpoint: '${JOVO_WEBHOOK_URL}',
};
And the proactive event intent is
async WeatherAlertIntent() {
// Sets timestamp to current date and time
let timestamp = new Date();
timestamp = timestamp.toISOString();
// Sets expiryTime 23 hours ahead of the current date and time
let expiryTime = new Date();
expiryTime.setHours(expiryTime.getHours() + 23);
expiryTime = expiryTime.toISOString();
const proactiveEventObject = {
"timestamp": timestamp,
"referenceId": "test-0001",
"expiryTime": expiryTime,
"event": {
"name": "AMAZON.WeatherAlert.Activated",
"payload": {
"weatherAlert": {
"source": "localizedattribute:source",
"alertType": "TORNADO"
}
}
},
"localizedAttributes": [
{
"locale": "en-US",
"source": "English Weather Channel"
}
],
"relevantAudience": {
"type": "Multicast",
"payload": {}
}
};
const accessToken = await this.$alexaSkill.$proactiveEvent.getAccessToken(
'',
''
);
console.log("AccessToken",accessToken)
const result = await this.$alexaSkill.$proactiveEvent.sendProactiveEvent(proactiveEventObject, accessToken);
console.log("RESULT",result)
}
I got the access token but while logging the result it shows
httpStatus: 400,
data:
{ type: ‘Bad Request’,
message: ‘Skill amzn1.ask.skill.68e04386-b318-40e1-baa8-6a969d11d6be in development does not have topic AMAZON.WeatherAlert.Activated defined in the manifest’ } }
Please help me to solve the issue.
thanks