アカウントリンクの管理
Note: Register now for Alexa Live, Amazon’s annual Alexa developer conference on July 20, 2022.
アカウントリンクの管理
このドキュメントでは、Alexaユーザーアカウントを他のOAuth IDプロバイダーにリンクするすべてのAPI操作について説明します。このAPIのエンドポイントは、https://api.amazonalexa.comです。すべてのAPIリクエストにはAuthorization
ヘッダーが必要であり、その値はLogin with Amazonから取得したアクセストークンでなければなりません。
関連トピック: Alexa Skills KitコマンドラインインターフェースとAlexaスキル管理APIの概要
アカウントリンク情報の取得
リクエスト
GET /v1/skills/{skillId}/stages/{stage}/accountLinkingClient
パラメーター
フィールド | 説明 | パラメーターの型 | 必須 |
---|---|---|---|
skillId | 一意のスキルIDです。 | パス | ◯ |
stage | スキルのステージです。有効な値は、development とlive (大文字小文字の区別あり)です。 |
パス | ◯ |
応答
HTTP/1.1 200 OK
ヘッダー
ETag: <etag_value>
本文
アカウントリンクのスキーマを参照してください。
{
"accountLinkingResponse": {
"skipOnEnablement": "true",
"clientId": "abc",
"authorizationUrl": "https://www.example.com/auth_url",
"accessTokenUrl": "https://www.example.com/accessToken_url",
"domains": [
"www.example.com"
],
"scopes": [
"scope_a",
"scope_b"
],
"accessTokenScheme": "HTTP_BASIC",
"type": "AUTH_CODE",
"defaultTokenExpirationInSeconds": 20,
"redirectUrls": [
"https://www.example.com/redirect_url"
]
}
}
例外
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
HTTP/1.1 429 Too Many Requests
HTTP/1.1 500 Internal Server Error
HTTP/1.1 503 Service Unavailable
アカウントリンクの更新
リクエスト
PUT /v1/skills/{skillId}/stages/{stage}/accountLinkingClient
パラメーター
フィールド | 説明 | パラメーターの型 | 必須 |
---|---|---|---|
skillId | 一意のスキルIDです。 | パス | ◯ |
stage | スキルのステージです。有効な値は、development (大文字小文字の区別あり)です。 |
パス | ◯ |
ヘッダー
If-Match: <etag_value>
本文
accountLinkingRequest
オブジェクトを含みます。アカウントリンクのスキーマを参照してください。
{
"accountLinkingRequest": {
"skipOnEnablement": "true",
"type": "AUTH_CODE",
"authorizationUrl": "https://www.example.com/auth_url",
"domains": [
"string"
],
"clientId": "string",
"scopes": [
"www.example.com"
],
"accessTokenUrl": "https://www.example.com/accessToken_url",
"clientSecret": "abcdaslkaa",
"accessTokenScheme": "HTTP_BASIC",
"defaultTokenExpirationInSeconds": 20,
"redirectUrls": [
"string"
]
}
}
応答
HTTP/1.1 204 No Content
ヘッダー
ETag: <etag_value>
例外
HTTP/1.1 400 Bad Request
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
HTTP/1.1 412 Precondition Failed
HTTP/1.1 429 Too Many Requests
HTTP/1.1 500 Internal Server Error
HTTP/1.1 503 Service Unavailable
アカウントリンクパートナーの削除
リクエスト
DELETE /v1/skills/{skillId}/stages/{stage}/accountLinkingClient
パラメーターの説明
フィールド | 説明 | パラメーターの型 | 必須 |
---|---|---|---|
skillId | 一意のスキルIDです。 | パス | ◯ |
stage | スキルのステージです。有効な値は、development (大文字小文字の区別あり)です。 |
パス | ◯ |
応答
HTTP/1.1 204 No Content
例外
HTTP/1.1 401 Unauthorized
HTTP/1.1 403 Forbidden
HTTP/1.1 404 Not Found
HTTP/1.1 429 Too Many Requests
HTTP/1.1 500 Internal Service Error
HTTP/1.1 503 Service Unavailable