question

Jimena avatar image
Jimena asked ·

'INVALID_TRIGGER' error on custom skill creating a reminder

Hi!

I'm trying to create a reminder using a custom skill. I'm following this guide https://developer.amazon.com/es-ES/docs/alexa/smapi/alexa-reminders-api-reference.html, and the reminder I'm trying to install is the one in the example:

  const reminder = {
    requestTime: "2020-02-14T17:04:00.672",
    trigger: {
      type: "SCHEDULED_ABSOLUTE",
      scheduledTime: "2020-02-14T17:00:00.000",
      timeZoneId: "Europe/Madrid",
      recurrence: {
        startDateTime: "2020-02-10T6:00:00.000",
        endDateTime: "2020-08-10T10:00:00.000",
        recurrenceRules: [
          "FREQ=DAILY;BYHOUR=6;BYMINUTE=10;BYSECOND=0;INTERVAL=1;",
          "FREQ=DAILY;BYHOUR=17;BYMINUTE=00;BYSECOND=0;INTERVAL=1;",
          "FREQ=DAILY;BYHOUR=22;BYMINUTE=45;BYSECOND=0;INTERVAL=1;"
        ]
      }
    },
    alertInfo: {
      spokenInfo: {
        content: [
          {
            locale: "en-US",
            text: "walk the dog",
            ssml: "<speak> walk the dog</speak>"
          }
        ]
      }
    },
    pushNotification: {
      status: "ENABLED"
    }
  };


When I do my post request I get the following 400 ERROR:

code: 'INVALID_TRIGGER',      
message: 'Invalid trigger info, triggerTime and corresponding fields do not match.' 


So what fields are wrong in my reminder?


Thanks and regards,

Jimena

alexa skills kitnodejsreminders
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Anand@Amazon avatar image
Anand@Amazon answered ·

Hi there,

Thanks for reaching out to us !!

"scheduledTime" , "startDateTime" & "endDateTime" should be more than the "requestTime".

Let me know if you have further question.

1 comment
10 |2000 characters needed characters left characters exceeded

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

That was it! Thank you for your help!!

0 Likes 0 ·