Skip to content
Branch: master
Find file Copy path
Find file Copy path
1 contributor

Users who have contributed to this file

61 lines (49 sloc) 4.12 KB

Private Alexa Skill With Salesforce Integration

Salesforce SetupDeployAccount LinkingTestingDistribute Private Skills

Part 3: Account Linking

Obtain Your Amazon Developer Account Linking Redirect URLs

In order to set up your Salesforce Connected App, you need your Amazon Developer Account Linking Redirect URLs. This is specific to your Amazon Developer account. You do not need to save any settings on this page at this time.

  1. Go to<Skill ID>/development/en_US/account-linking.
  2. Move the slider to the right of the question "Do you allow users to create an account or link to an existing account with you?" to the right to enable account linking.
  3. Copy and store the three URLs that show next to Redirect URLs at the bottom of the page. They will look like this:
  •<Vendor ID>
  •<Vendor ID>
  •<Vendor ID>

Create a Connected App in Salesforce

  1. Launch your Trailhead Playground org and click the Setup icon in the top right, then select the Setup link.
  2. Enter App Manager into the Quick Find box and then select App Manager.
  3. Click New Connected App.
  4. In the New Connected App form, fill in:
  • Basic Information:
    • Connected App Name: Alexa Skill
    • API Name: Alexa_Skill
    • Contact Email: enter your email address
  • API (Enable OAuth Settings):
    • Check Enable OAuth Settings.
    • For Callback URL, use the Redirect URLs from the previous step.
    • In Selected OAuth Scopes, select Access and manage your data (api).
    • Click Add.
    • In Selected OAuth Scopes, select Perform requests on your behalf at any time (refresh_token, offline_access).
    • Click Add.
  • Click Save.
  • Click Continue.
  1. Click App Manager again. Locate your newly created Alexa Skill and click the dropdown arrow on the far right. Select View.
  2. Copy and store the Consumer Key and the Consumer Secret (click the Click to reveal button to see the secret key). You will need this shortly.

Update Your Skill to Link to Your Salesforce Org

With the details set in your Trailhead Playground Org, we can set up account linking with the Alexa skill we created earlier.

  1. Go back to the ASK CLI. Enter the following command and fill out the resulting entries using your Connected App settings:
$ ask api create-account-linking -s <Skill ID>
? Authorization URL:
? Client ID:  <Your Client ID>
? Scopes(separate by comma):  api,refresh_token
? Domains(separate by comma):  
? Authorization Grant Type:  AUTH_CODE
? Access Token URI:
? Client Secret:  [hidden] <Your Client Secret>
? Client Authentication Scheme:  REQUEST_BODY_CREDENTIALS
? Optional* Default Access Token Expiration Time In Seconds: 3600
Account Linking created successfully.
  1. The Default Access Token Expiration Time In Seconds field is required for Salesforce account linking. If you notice that you need to constantly re-link your Salesforce account to use the skill, re-do the previous step.


You can’t perform that action at this time.