Account Linking Schemas
The accountLinkingRequest
structure is a JSON representation of the account linking information shown on the Build > Account Linking section of the developer console.
To create and get account linking information, you can use the update-account-linking-info and get-account-linking-info subcommands of the ASK CLI.
See also: Alexa Skills Kit Command Line Interface (ASK CLI) Overview
Account linking request
Field | Description | Type |
---|---|---|
|
The type of authentication used such as |
String |
|
URI for requesting authorization tokens. Required only when |
String |
|
A credential you provide that lets the Alexa service authenticate with the Access Token URI. This is combined with |
String |
|
Optional. The time in seconds for which the access token is valid. This value is used if the OAuth client does not return |
Integer |
|
A list of additional domains that your login page fetches content from. You can specify up to 15 domains. |
Array of String |
|
Optional. Link(s) that send the user back to your app after they acknowledge the linking request in the Alexa app or Login with Amazon using app-to-app account linking. In the developer console, you specify these on the Build > Account Linking page using the Your Redirect URLs field. |
This URI will be invoked with authorization codes that can be exchanged for Alexa access tokens. |
|
Something |
Array of String |
|
Indicates the access that you need for the user account such as |
Array of String |
|
Set to |
Boolean |
|
Specifies the OAuth authorization grant type. Use |
String |
|
Optional. Specifies whether the skill supports voice-forward account linking. Valid values: |
String enum |
|
A list of authorization platform objects that contain the URL that will be used as a Universal Link or App Link to open the authorization page of your app.
|
Array of authorization platforms |
Sample account linking request
{
"accountLinkingRequest": {
"skipOnEnablement": "true",
"type": "AUTH_CODE",
"authorizationUrl": "string",
"domains": [
"string"
],
"clientId": "string",
"scopes": [
"string"
],
"voiceForwardAccountLinking": "string",
"accessTokenUrl": "string",
"reciprocalAccessTokenUrl": "string",
"clientSecret": "string",
"accessTokenScheme": "HTTP_BASIC",
"defaultTokenExpirationInSeconds": 3600,
"redirectUrls": [
"string"
],
"authorizationUrlsByPlatform": [
{
"platformType": "iOS",
"platformAuthorizationUrl": "https://youriOSURL"
},
{
"platformType": "Android",
"platformAuthorizationUrl": "https://yourAndroidURL"
}
]
}
}
Redirect URLs
In terms of account linking, there are two types of redirect URLs: Alexa redirect URLs and your redirect URLs. The difference is as follows:
- Alexa redirect URLs – These URLs, which point to the Alexa app, have constant, predetermined values. You do not define them, which is why they are not in the account linking request schema defined in the previous section. You can find these URLs in the developer console on the Build > Account Linking page in the Alexa Redirect URLs field. When the Alexa app makes a request to your authorization URI, it passes the Alexa redirect URLs using the
redirect_uri
field in the query parameters.
For authorization code grants, theredirect_uri
format is{baseUrl}/api/skill/link/{vendorId}
.
For implicit grants, theredirect_uri
format is{baseURL}/spa/skill/account-linking-status.html?vendorId={vendorId}
. Valid values forbaseUrl
arehttps://pitangui.amazon.com
,https://layla.amazon.com
, andhttps://alexa.amazon.co.jp
. - Your redirect URLs – These URLs, which point to your own app, are only for app-to-app account linking implementations. You specify these URLs in the developer console on the Build > Account Linking page using the Your Redirect URLs field or, if you are using SMAPI, the
redirectUrls
field of the account linking request schema defined in the previous section.
Last updated: Jun 13, 2022