Alexa skill to change a variable on a website - database

I have an alexa skill and a website. I need to send requests from the alexa skill to change a certain variable on a website.
for examble, I have a name on the website lets say "michael", I want to be able to change that name to "zack" from alexa.

Alexa skill SDK allows you to perform remote calls to third-party APIs.
In your case, you can implement an API endpoint to change that field. Then you can call that endpoint with the data you need.
You can capture the name your user has been said.
By doing that, you would need to think how you will authenticate the user. Basically, you need to know how to match the user who is using Alexa with the user on your website. I don't think you want to change the name for the random user.

Related

Amazon Alexa Skill: Save user preferences like API Key not through code

Within a custom Alexa skill hosted as a lambda service, I need to call an external API with an API key, that changes for each device. So I can't put the URL or the API Key hard-coded into the skill's code.
Whats the best practice to store user settings locally like an API Key for an Alexa skill? I tried to create an intent, where the user can dictate e.g. the API key, but it doesnt really work quite well and is not that user friendly. Unfortunately, I dindt find a way to create some sort of user preferences site, that might be accessabble for example through the Alexa app on the connected iPhone.
Each request comes with a User ID that uniquely identifies the owner of the device. I use that as a filename for an S3 bucket, retrieving that json file on my Launch intent and storing the info in the session vars. You can store anything you like in the S3 file and retrieve it per user.
There is no way to save any info without writing the code to do so. When the skill is first loaded, all session vars are empty. You need to write code to use the user id to lookup necessary info.

Alexa Out -of- session - Skill Messaging API

I’m trying to create an Alexa capability that creates reminders without user voice invocation. To achieve this Alexa suggested to use “Out of session” interaction event i.e Skill Messaging API (https://api.amazonalexa.com/v1/skillmessages/users/{userId}), as you can see in the API we need to pass the user Id, In order to get the user Id Alexa suggest to do first account-linking, once linking is done we’ll get the user profile access including userId. Now, after hitting the Skill Messaging API with received userId, it returns
{type:”not_found”, a message ”invalid user Id”}.
Not sure where am I going wrong. Has anyone phase the same problem.
In the request shown next, set HOST to one of the following, depending on the user's region: api.amazonalexa.com, api.eu.amazonalexa.com, or api.fe.amazonalexa.com

Alexa Skill - Retrieve User's mail within multi-turn dialog

I am developping an Alexa Skill within the one the user has to provide a serie of answers to my backend (node.js) in order to get the right result. I would like to send this result by email.
Is it possible to retrieve the user's email through the API put at disposal by AWS using the Dialog.delegate method?
Thanks !
There is no built in method can get you the current user email id or any personal info.
But with authentication you can. See this blog post. You'll need to create an Amazon App and link it to your amazon skill using Account Linking. For the first time when you ask for the email, user has to accept access with their Alexa app. You can then save this email in your DB for future purposes. This is a long but recommended method.
The simplest method: Whenever the game is finished you can manually ask the user for email address. But Alexa may not recognize email address spoken by users properly and might break your app. I don't know, but maybe Alexa will reject your app for asking personal info this way!

Alexa Skill - Dynamic Invocation Name

I am working on an Alexa Skill.
Right now I have hard coded my invocation name in my amazon console. I have a ruby admin panel which handles all other activities happening inside.
Is there any way I can put the Invocation Name via an admin panel and pass it on to Alexa skill like an API, which could change my skill's invocation name.
No you can't. Innovation name cannot be changed via an API. You can change your invocation name at any time while developing a skill. You cannot change the invocation name after a skill is certified and published.
ASK-CLI
However, you can use ASK-CLI to deploy/update a skill and you can also change your invocation name in the corresponding interaction model.
More on ASK CLI here

How to make phone call from custom alexa skill

My intent to call the specified phone number from my own skill.
For example
Me: Alexa, ask <invocation> to find the customer service number
Alexa: Sure, the customer service number is 1800-xxx-xxx-xxx. Would you like to call
Me: Yes
[HOW TO MAKE CALL NOW?]
It would be possible to open a phone call from your programmed skill (alexa skill service). But for sure you not just want to start the call but also that the user can speak into alexa? But it's not possible to get the voice from the user.
Amazon Alexa transfers the speech input into text.
Your skill service only get JSON requests from the amazon skill interface with intents and spoken things as text.
So there is no chance to the get the audio track from the alexa user. Also stated in the forum
There is a feature request - you should watch this feature and vote for it.
Or you implement something like a callbackservice that you interconnect users telephone to service customer number. E.g. via an app on the phone - see this
You can make a call using your echo device or using the Alexa app as long as contact is in your list using Alexa Calling. Calling is only supported in U.S., U.K., Canada, and Mexico.
Here is another link to help you setup
https://au.pcmag.com/gallery/60053/how-to-call-someone-from-your-amazon-echo

Resources