Account Linking Schemas (Skill Management API)
- Account Linking Request
- Sample Account Linking Request
- Redirect URLs After Customer Account Authenticated
The accountLinkingRequest structure is a JSON representation of the account linking information shown on the configuration tab of the developer portal.
You can create and get account linking information by using the create-account-linking and get-account-linking subcommands of the ask api command.
See also: Alexa Skills Kit Command-Line Interface and Alexa Skill Management API Overview
Account Linking Request
| Field | Description | Type |
|---|---|---|
type |
Specifies the OAuth authorization grant type. Use AUTH_CODE or IMPLICIT. NOTE: You must use AUTH_CODE with smart home skills. |
String |
authorizationUrl |
Authorization URI | String |
domains |
A list of additional domains that your login page fetches content from. You can specify up to 15 domains. | Array of String |
clientId |
Identifier your login page uses to recognize that the request came from your skill. | String |
scopes |
Indicates the access that you need for the customer account such as user_id. This field is required for smart home skills. You can specify up to 15 scopes. |
Array of String |
accessTokenUrl |
URI for requesting authorization tokens. Required only when AUTH_CODE is specified for type. |
String |
clientSecret |
A credential you provide that lets the Alexa service authenticate with the Access Token URI. This is combined with clientId to identify the request as coming from Alexa. |
String |
accessTokenScheme |
The type of authentication used such as HTTP_BASIC, or REQUEST_BODY_CREDENTIALS. Required only when AUTH_CODE is specified. |
String |
defaultTokenExpirationInSeconds |
Optional. The time in seconds for which access token is valid. If the OAuth client returns “expires_in”, it will be overwritten by this parameter. Only applicable if type is AUTH_CODE. |
Integer |
Sample Account Linking Request
{
"accountLinkingRequest": {
"type": "AUTH_CODE",
"authorizationUrl": "string",
"domains": [
"string"
],
"clientId": "string",
"scopes": [
"string"
],
"accessTokenUrl": "string",
"clientSecret": "string",
"accessTokenScheme": "HTTP_BASIC",
"defaultTokenExpirationInSeconds": 3600
}
}
Redirect URLs After Customer Account Authenticated
As described in Redirect URL Values, the redirect URL is the URL to which your service redirects the customer after the customer has been authenticated. This redirect URL is referenced with the redirect_uri field.
Because the redirect_uri field has constant, pre-determined values, it is not part of the account linking schema, and thus cannot be parsed from user input.
For an authorization code grant, such as used for all smart home skills and some custom skills, the format of the redirect_uri value is as follows:
{baseUrl}/api/skill/link/{vendorId}
For an implicit grant, which is used for some custom skills, the format of the redirect_uri value is as follows:
{baseURL}/spa/skill/account-linking-status.html?vendorId={vendorId}
The list of valid HTTPS redirection endpoints, which are possible values for baseUrl, include the following:
-
“https://pitangui.amazon.com”
-
“https://layla.amazon.com”
See How Account Linking Works for more information on the difference between these OAuth authorization grant types.