メニュー

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Alexa

With Twilio Autopilot you can build Alexa Skills. On this page we'll walk you through how to link Alexa and Autopilot. These steps will link the two:

  1. Go to https://developer.amazon.com/alexa/console/ask
  2. Click the Create Skill button
  3. Fill in your skill project name
  4. On the next tab, choose Custom and Provision your own hit the Create Skill button
  5. Once you're in the builder IDE, click on the Invocation sidebar tab
    1. Pick an invocation name. This is the name used to invoke the skill say, "owl cafe", from the phrase "Alexa, ask owl cafe to order me a coffee"
    2. Hit Save
  6. In another tab, navigate to the Twilio Autopilot Assistant list
    1. Click the Assistant you are working on
    2. Click Channels
    3. Click Alexa
    4. Type in the Invocation Name from the step above
    5. Click Generate JSON
  7. Switch back to the Amazon Developer Console tab, and Click on the JSON editor sidebar button
    1. Paste the JSON that was generated in the step above
    2. Click Save Model
    3. Click Build Model
  8. Click on the Endpoints sidebar button
    1. Click the HTTPS radio button
    2. Paste the URL from the Autopilot Console
    3. Make sure you change the invocationName in the JSON.
    4. Choose "My development endpoint is a subdomain . . . " for SSL configuration
    5. Click Save Endpoints
  9. Go to the Test tab and interact with Autopilot by typing or saying "ask <your skill name> <something something>"

Account Linking

Autopilot supports Alexa account linking for skills that require the ability to connect the identity of the user with a user in another system. This is referred to as account linking, since the goal is to create a link between the Alexa user and the user account in your system.

Please see the Account Linking for custom Skills documentation

You will get the Token referenced here in the Autopilot request when the request comes from Alexa and the Skill has Account linking setup.

{
  "user": { "userId": "amzn1.ask.account.XXXXXXXXXX", "accessToken": "Atza|AAAAAABBBBBBCCCCCC" },
  "passthrough":{
    "name":"passthrough",
    "value":"make a reservation",
    "confirmationStatus":"NONE"}
}

Autopilot URL Parameters

パラメーター 概要
TargetTask

A string representing the unique name of the destination Task. If no TargetTask is provided, the destination task is determined by the natural language understanding.


TargetTask is useful when you want to control what task a user is routed to.

For Example: Note the TargetTask parameter at the end of the URL

https://channels.autopilot.twilio.com/v1/<ACCOUNT_SID>/<ASSISTANT_SID>/alexa?TargetTask=alexa_welcome

Any skill configured with this URL will land in the alexa_welcome task.

Rate this page:

ヘルプが必要ですか?

誰しもが一度は考える「コーディングって難しい」。そんな時は、お問い合わせフォームから質問してください。 または、Stack Overflow でTwilioタグのついた情報から欲しいものを探してみましょう。