question

MoonDekade avatar image
MoonDekade asked

Proactive Event - Status 202 but no notification

Hello,


skill id: amzn1.ask.skill.3d3e4626-a36a-41dd-ad01-817a045a5d23

My event calls seem to be successful (status code 202) but no notifications are received. My endpoint is not called. My endpoint works and is called successfully for my other Intents.

I am not using a Lambda endpoint.

Since the MediaContent.Available event uses a predefined response, I don't understand the need for an endpoint anyway.


{
    "manifest": {
        "apis": {
            "custom": {
                "endpoint": {
                    "uri": "https://xyz.ngrok.io",
                    "sslCertificateType": "Wildcard"
                },
                "interfaces": []
            }
        },
        "manifestVersion": "1.0",
        "permissions": [
            {
                "name": "alexa::alerts:reminders:skill:readwrite"
            },
            {
                "name": "alexa::devices:all:notifications:write"
            }
        ],
        "events": {
            "publications": [
                {
                    "eventName": "AMAZON.MessageAlert.Activated"
                },
                {
                    "eventName": "AMAZON.MediaContent.Available"
                }
            ],
            "endpoint": {
                "uri": "https://xyz.ngrok.io",
                "sslCertificateType": "Wildcard"
            },
            "regions": {
                "NA": {
                    "endpoint": {
                        "uri": "https://xyz.ngrok.io",
                        "sslCertificateType": "Wildcard"
                    }
                }
            }
        },
        "publishingInformation": {
            "locales": {
                "en-US": {
                    "name": "askcli-test1",
                    "summary": "Sample Short Description",
                    "description": "Sample Full Description",
                    "examplePhrases": [
                        "Alexa open squid test one"
                    ]
                }
            },
            "isAvailableWorldwide": true,
            "testingInstructions": "Sample Testing Instructions.",
            "category": "KNOWLEDGE_AND_TRIVIA",
            "distributionCountries": []
        }
    }
}



Example POST


    "hostname": "api.amazonalexa.com",
    "port": 443,
    "path": "/v1/proactiveEvents/stages/development",
    "method": "POST",
    "headers": {
        "Content-Type": "application/json",
        "Content-Length": 544,
        "Authorization": "Bearer ..."
    }
}
{
    "timestamp": "2019-09-17T22:03:21.379Z",
    "referenceId": "SampleReferenceId1568757801382x",
    "expiryTime": "2019-09-18T08:03:21.379Z",
    "event": {
        "name": "AMAZON.MediaContent.Available",
        "payload": {
            "availability": {
                "startTime": "2019-10-01T20:00:00Z",
            "provider": {
                "name": "localizedattribute:providerName"
            },
            "method": "AIR"
        },
        "content": {
            "name": "localizedattribute:contentName",
            "contentType": "EPISODE"
        }
    }
},
"localizedAttributes": [
    {
        "locale": "en-US",
        "providerName": "Squid Video",
        "contentName": "History of Squids"
    }
],
"relevantAudience": {
    "type": "Multicast",
    "payload": {}
    }
}


POST RESPONSE


202 Accepted
Content-Length: 0
Connection: keep-alive
Server: Server
Date: Tue, 17 Sep 2019 22:58:57 GMT
X-Amzn-RequestId: 26b6a0b9-a419-c4a7-6d36-8b9df9350a53
x-amz-rid: FGD9QDVDSRVCC19RW0Y1
Vary: Accept-Encoding,X-Amzn-CDN-Cache,X-Amzn-AX-Treatment,User-Agent
X-Cache: Miss from cloudfront
Via: 1.1 bedc7f726c5c61bbe5343fc78dc92c32.cloudfront.net (CloudFront)
X-Amz-Cf-Pop: MIA3-C3
X-Amz-Cf-Id: j0qHP4UqHRCS92aZ27ObS3SYEJzds5ngvcp4s9aAKq5_KR6P0Wg_cA==




proactive events
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

Amazon_Bernardo Bezerra avatar image
Amazon_Bernardo Bezerra answered

Hello @MoonDekade and thanks for your message.

The 202 HTTP response means that the payload was received and is not malformed, but does not necessarily means that it has been correctly processed by the service.

Taking a look at the documentation and comparing with your example POST, I noticed that you have a "relevantAudience" key, which does not appear in the one shown in the documentation. Have you tried without it?

If this does not solve your issue, please share the activity ID of the utterance that you are using to trigger the notification. This page explains how to retrieve those.

Regards,
Barry

10 |5000

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