stoiveyp / Alexa.NET.Reminders

Small helper library for Alexa.NET based skills to access the reminders API
MIT License
4 stars 1 forks source link

Create reminder throws error #9

Open saikat2k01 opened 5 years ago

saikat2k01 commented 5 years ago

While using the code base from the project to create a reminder, I get the following error: Error at Alexa.NET.Response.RemindersClient.d8.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at AlexaWebAPI.Controllers.ReminderController.d0.MoveNext()

Can you please help me understand what is going wrong here. Code Snippet used to create reminder: var reminder = new Reminder { RequestTime = DateTime.UtcNow, Trigger = new RelativeTrigger(12 60 60), AlertInformation = new AlertInformation(new[] { new SpokenContent("it's a test", "en-GB") }), PushNotification = PushNotification.Disabled }; var client = new RemindersClient(RemindersClient.ReminderDomain,input.Session.User.AccessToken); var alertDetail = await client.Create(reminder);

raymondjstone commented 5 years ago

Have you ensured that the client alexa gave permissions. you would get an error if it has not.

saikat2k01 commented 5 years ago

Yes, I gave permission to my skill. Do I need to enable any other permissions?When I look at the message, it says:"Invalid bearer token".

raymondjstone commented 5 years ago

there are two permissions needed, one in the skill setup on the developer console and one for each user of the skill in the alexa app or website. Certainly with them in place it works fine for me

raymondjstone commented 5 years ago

I note that for me the skills permission for reminders is NOT available in the alexa app, only the website