Get CPR certified in 30 minutes at CPR Test Center.
Echo & Alexa Forums

Reminders API in Alexa Skills Problem

0 Members and 1 Guest are viewing this topic.

Reminders API in Alexa Skills Problem
« on: November 22, 2021, 05:31:03 am »
Hello!
I am pretty new in developing Alexa Skills.
I'm creating an app, where you can check the time of your next bus on your nearest bus stop. When bus is near this bus stop, you get the reminder on your Echo and Alexa App. Everything works well on my account, on wich I created this app. The problem occured when I gave my Beta Skill to test it by someone else. When I use this app from my account everything works as it should, but when someone else tries to do it, there is an error. Permissions for this skill are already set up.
I was debugging my skill for hours, trying to check on witch line this error exists. It happens to be here "reminderApiClient.createReminder(reminderRequest);"

What I do is:

const reminderRequest = {
trigger: {
type: "SCHEDULED_RELATIVE",
offsetInSeconds: "15",
},
alertInfo: {
spokenInfo: {
content: [
{
locale: "en-GB",
text: "The Reminder",
},
],
},
},
pushNotification: {
status: "ENABLED",
},
};

let reminderApiClient = handlerInput.serviceClientFactory.getReminderManagementServiceClient();

await reminderApiClient.createReminder(reminderRequest);

exports.handler = Alexa.SkillBuilders.custom()
.addRequestHandlers(
...
)
.addErrorHandlers(ErrorHandler)
.withPersistenceAdapter(
new Adapter.DynamoDbPersistenceAdapter({
tableName: dynamoDBTableName,
})
)
.withApiClient(new Alexa.DefaultApiClient())
.lambda();

So As I said, weird thing is that on my primary account the skill is working correctly, but on the second account (where is beta test), reminder is giving me an error.
Any thoughts?