0

I wrote a skill for alexa using the proactive notification function from Amazon.

It was working fine until yesterday, I could see the amazon echo blinking with yellow color.

When I queried the device "Alexa, check my notifications", the information was available.

However today it does not work and I get the following error:

"Violations for metadata: [expiryTime should be at least 5 minutes in the future and no more than 24 hours after the current time"

This is the notification I am sending, I include the current time and the expiration time with an offset of 10 minutes. See the example below

Any idea what could be wrong?

Thanks in advance,

Ester

{ "timestamp": "2019-01-30T00:11:20", "referenceId": "98871463", "expiryTime": "2019-01-30T00:11:30", "event": { "name": "Alerted", "payload": { "type": "AMAZON.MessageGroup.Alerted", "messageState": { "type": "AMAZON.MessageState", "status": "UNREAD", "freshness": "NEW" }, "message": { "type": "AMAZON.Message", "creator": { "type": "AMAZON.Person", "name": "eve" }, "count": 1, "urgency": "URGENT" } } }, "relevantAudience": { "type": "Multicast", "payload": { } } }

  • I would start by looking at the time the request is proceeding server side because your window to expire is only 10 minutes. the server is making the call UTC time be sure your timestamp is coordinated to server time. – Chuck LaPress Jan 30 '19 at 14:26

1 Answers1

1

I found the error. It was a bug in my code. I was sending the incorrect date, the message timestamp was wrongly sent in the past, and the same happened with the expiryTime. So the error sent back by Amazon was correct.