You have to do a few steps. I’m copying the relevant parts from the Alexa docs
Step 1:
Obtain Skill AccessToken https://developer.amazon.com/en-US/docs/alexa/smapi/skill-messaging-api-reference.html#obtain-the-skill-messaging-token
You get the client id and the client secret for your skill in your build -> permissions tab in the developer console.
SKILL_CLIENT_ID='YOUR_SKILL_CLIENT_ID'
SKILL_CLIENT_SECRET='YOUR_SKILL_CLIENT_SECRET'
API_URL='https://api.amazon.com/auth/O2/token'
curl -k -X POST \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "grant_type=client_credentials&scope=alexa:skill_messaging&client_id=$SKILL_CLIENT_ID&client_secret=$SKILL_CLIENT_SECRET" \
$API_URL
You will get an access token. Use this access token posting messages to your skills via the messaging API.
Step 2: Send a message to your skill with the Alexa user id (where you want to change the reminders)
ALEXA_USER_ID='ReplaceWithUserId'
SKILL_MESSAGING_TOKEN='ReplaceWithToken'
MESSAGE='{"data":{ "sampleMessage": "Sample Message"}, "expiresAfterSeconds": 60}'
API_URL=https://api.amazonalexa.com/v1/skillmessages/users/$ALEXA_USER_ID
curl -v -s -k -X POST \
-H "Authorization: Bearer $SKILL_MESSAGING_TOKEN" \
-H "Content-Type: application/json" \
-d "$MESSAGE" \
$API_URL
Step 3: Receive the message in your skill and view/change reminders as always. I just checked. It’s not the cleanest approach but it should work:
//
async ON_REQUEST() {
if ((this.$request as AlexaRequest).request?.type === 'Messaging.MessageReceived') {
const reminders = await this.$alexaSkill!.$user.getAllReminders();
console.log(reminders);
return;
}
},
Hope this helps