question

Dhina avatar image
Dhina asked

Alex proactive event not working

I have created an Alexa proactive event and its in development stage I have created the token and created the proactive event and getting 202 as response code but reminder or notifications not happening in Alexa device. Below are my skill id.


amzn1.ask.skill.1434848b-af63-4b9b-a9bd-7aad5f09e9c5

alexa skills
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Are you calling the correct endpoint for your region ?

Post up the endpoint you're calling and the apiEndpoint value in the request payload your skill receives when it's launched.

And have you added the Proactive event schema name to your skill.json manifest and added notification permissions ? (you should receive an error, not a 202 if you haven't but worth checking anyway).

10 |5000

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

Dhina avatar image
Dhina answered
{
    "timestamp": "2023-09-11T14:05:48Z",
    "referenceId": "af879e49-4c94-43dd-aef0-d4b70e73dc4e",
    "expiryTime": "2023-09-11T15:05:48Z",
    "event": {
        "name": "AMAZON.Occasion.Updated",
        "payload": {
            "state": {
                "confirmationStatus": "CONFIRMED"
            },
            "occasion": {
                "occasionType": "APPOINTMENT",
                "subject": "localizedattribute:subject",
                "provider": {
                    "name": "localizedattribute:providerName"
                },
                "bookingTime": "2023-09-11T14:05:48.644364+05:30",
                "broker": {
                    "name": "localizedattribute:brokerName"
                }
            }
        }
    },
    "localizedAttributes": [
        {
            "locale": "en-US",
            "subject": "root canal",
            "providerName": "Dental XYZ",
            "brokerName": "Dental XYZ"
        }
    ],
    "relevantAudience": {
        "type": "Multicast",
        "payload": {}
    }
}

10 |5000

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

Dhina avatar image
Dhina answered
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

OK, are you calling the proactive events API from within an Alexa skill session or via an external piece of code ?

What coding language are you using ?

Are you using Amazon provided helper functions or calling the APIs directly using https requests ?

The endpoint you're calling is for North America, is that where your users are based ? For Asia you should use https://api.fe.amazonalexa.com/v1/proactiveEvents/stages/development

Have you included the AMAZON.Occasion.Updated schema name in your skill manifest and added notification permissions ?

Like this:

{
  "permissions": [
    {
      "name": "alexa::devices:all:notifications:write"
    }
  ],
  "events": {
    "publications": [
      {
        "eventName": "AMAZON.Occasion.Updated"
      }
    ]
  }
}
10 |5000

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

Dhina avatar image
Dhina answered

I am using both POSTMAN and C# code and calling APIs directly using https requests and I am from India


10 |5000

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

Dhina avatar image
Dhina answered

Below permission are correct. But still not Alexa notifications

  1. {
  2. "permissions": [
  3. {
  4. "name": "alexa::devices:all:notifications:write"
  5. }
  6. ],
  7. "events": {
  8. "publications": [
  9. {
  10. "eventName": "AMAZON.Occasion.Updated"
  11. }
  12. ]
  13. }
  14. }
1 comment
10 |5000

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

Dhina avatar image
Dhina answered

Yes I have tried above URL still its not working

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

Andy Whitworth avatar image Andy Whitworth commented ·

Status code still 202 ?

0 Likes 0 ·
Dhina avatar image Dhina Andy Whitworth commented ·
Yes status 202
0 Likes 0 ·
Dhina avatar image
Dhina answered

I am using this API https://api.fe.amazonalexa.com/v1/proactiveEvents/stages/development and below are my input parameters

1694531282087.png


1694531282087.png (29.7 KiB)
10 |5000

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

Andy Whitworth avatar image
Andy Whitworth answered

Has the Alexa user of the skill you're sending the notification for enabled notifications in the Alexa app ?

10 |5000

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

Dhina avatar image
Dhina answered

Yes its already enabled

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

Jonathan Suarez avatar image Jonathan Suarez commented ·
Hello Dhina


Why don't you going to go at on these youtube tutorials more much better to resolve it on our problems issues?


I hope this helps.

1 Like 1 ·
Andy Whitworth avatar image Andy Whitworth commented ·
Sorry then I'm out of ideas. I use Proactive Events successfully in a number of skills and have never had a problem.

Good luck!

0 Likes 0 ·