擷取特定程式碼的設定檔 retrieve-profile-for-specific-code

IMPORTANT
此頁面上的內容僅供參考。 使用此API需要Adobe的目前授權。 不允許未經授權的使用。
IMPORTANT
REST API V2實作受到節流機制檔案的限制。

請求 request

HTTP
路徑
/api/v2/{serviceProvider}/profiles/code/{code}
方法
GET
路徑引數
服務提供者
在上線流程中與服務提供者相關聯的內部唯一識別碼。
必填
程式碼
在串流裝置上建立驗證工作階段後取得的驗證代碼。
必填
標頭
Authorization
授權標標頭檔案中說明了持有人權杖承載的產生。
必填
X-Forwarded-For
串流裝置的IP位址。

強烈建議一律將它用於伺服器對伺服器的實作,尤其是當呼叫是由程式設計人員服務(而非串流裝置)進行時。

對於使用者端對伺服器實作,會以隱含方式傳送串流裝置的IP位址。
可選
AP-TempPass-Identity
AP-TempPass-Identity標標頭檔案中說明了產生使用者唯一識別碼承載的流程。
可選
Accept
使用者端應用程式接受的媒體型別。

若指定,則必須是application/json。
可選
User-Agent
使用者端應用程式的使用者代理。
可選

回應 response

程式碼
文字
說明
200
確定
回應本文包含有效設定檔的地圖,該地圖可能為空白。
400
錯誤請求
請求無效,使用者端需要修正請求,然後再試一次。 回應本文可能包含遵守增強錯誤碼檔案的錯誤資訊。
401
未獲授權
存取權杖無效,使用者端需要取得新的存取權杖並重試。 如需詳細資訊,請參閱動態使用者端註冊概觀檔案。
403
已禁止
暫時存取存留時間(TTL)已過期或超出資源的最大數目,使用者端需要指示使用者使用一般MVPD來啟動基本驗證流程。 回應本文可能包含遵守增強錯誤碼檔案的錯誤資訊。
405
不允許的方法
HTTP方法無效,使用者端需要使用請求資源所允許的HTTP方法,然後再試一次。 如需詳細資訊,請參閱要求區段。
500
內部伺服器錯誤
伺服器端發生問題。 回應本文可能包含遵守增強錯誤碼檔案的錯誤資訊。

成功 success

標頭
狀態
200
必填
Content-Type
application/json
必填
內文
設定檔

JSON包含索引鍵、值配對的對應。

索引鍵元素由下列值定義:

table 0-row-3 1-row-3 1-bgcolor-eff2f7 2-bgcolor-eff2f7 3-bgcolor-eff2f7 5-bgcolor-deebff layout-auto html-authored
mvpd 上線流程中與身分提供者相關聯的內部唯一識別碼。 必填

值元素由下列屬性定義:

table 0-row-3 1-row-3 2-row-3 3-row-3 4-row-3 5-row-3 1-bgcolor-eff2f7 2-bgcolor-eff2f7 3-bgcolor-eff2f7 5-bgcolor-deebff 9-bgcolor-deebff 13-bgcolor-deebff 17-bgcolor-deebff 21-bgcolor-deebff layout-auto html-authored
屬性
notBefore 設定檔無效之前的時間戳記。 必填
notAfter 設定檔失效之前的時間戳記。 必填
簽發者

擁有設定檔的實體。

可能的值包括:

  • mvpd (例如Spectrum、Cablevision等)
    建立設定檔的原因是:基本驗證。
  • Adobe
    建立設定檔的原因是:存取許可權降低、暫時存取。
必填
type

設定檔的型別。

可能的值包括:

  • 一般
    設定檔的建立是因為:基本驗證。
  • 已降級
    設定檔是因為:存取已降級。
  • 暫時
    建立設定檔的原因是:暫時存取。
必填
屬性

使用者中繼資料屬性的清單。

這些屬性可以是:

  • 強制性,例如「userId」
  • 非強制性,例如「zip」、「householdId」、「maxRating」等。

屬性的值可以是:

  • 簡單
  • 清單
  • 地圖
必填
必填

錯誤 error

標頭
狀態
400, 401, 403, 405, 500
必填
Content-Type
application/json
必填
內文
回應內文可能會提供其他錯誤資訊,這些資訊會遵守增強型錯誤碼檔案。
必填

範例 samples

1.擷取透過基本驗證取得之特定程式碼的設定檔

要求
code language-https
GET /api/v2/REF30/profiles/code/XTC98W HTTP/1.1

    Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjNGZjM2U3ZS0xMmQ5LTQ5NWQtYjc0Mi02YWVhYzhhNDkwZTciLCJuYmYiOjE3MjQwODc4NjgsImlzcyI6ImF1dGguYWRvYmUuY29tIiwic2NvcGVzIjoiYXBpOmNsaWVudDp2MiIsImV4cCI6MTcyNDEwOTQ2OCwiaWF0IjoxNzI0MDg3ODY4fQ.DJ9GFl_yKAp2Qw-NVcBeRSnxIhqrwxhns5T5jU31N2tiHxCucKLSQ5guBygqkkJx6D0N_93f50meEEyfb7frbHhVHHwmRjHYjkfrWqHCpviwVjVZKKwl8Y3FEMb0bjKIB8p_E3txX9IbzeNGWRufZBRh2sxB5Q9B7XYINpVfh8s_sFvskrbDu5c01neCx5kEagEW5CtE0_EXTgEb5FSr_SfQG3UUu_iwlkOggOh_kOP_5GueElf9jn-bYBMnpObyN5s-FzuHDG5Rtac5rvcWqVW2reEqFTHqLI4rVC7UKQb6DSvPBPV4AgrutAvk30CYgDsOQILVyrjniincp7r9Ww
    Accept: application/json
    User-Agent: Mozilla/5.0 (Apple TV; U; CPU AppleTV5,3 OS 11.0 like Mac OS X; en_US)
回應
code language-https
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

{
    "profiles": {
        "Cablevision": {
            "notBefore": 1623943955,
            "notAfter": 1623951155,
            "issuer": "Cablevision",
            "type": "regular",
            "attributes": {
                "userId": {
                    "value": "BASE64_value_userId",
                    "state": "plain"
                },
                "householdId" : {
                    "value": "BASE64_value_householdId",
                    "state": "plain"
                },
                "zip" : {
                    "value": "BASE64_value_zip",
                    "state": "enc"
                },
                "parental-controls" : {
                    "value": BASE64_value_parental-controls,
                    "state": "plain"
                }
            }
        }
     }
}

2.在選取基本TempPass時擷取特定程式碼的設定檔

要求
code language-https
GET /api/v2/REF30/profiles/code/XTC98W HTTP/1.1

    Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjNGZjM2U3ZS0xMmQ5LTQ5NWQtYjc0Mi02YWVhYzhhNDkwZTciLCJuYmYiOjE3MjQwODc4NjgsImlzcyI6ImF1dGguYWRvYmUuY29tIiwic2NvcGVzIjoiYXBpOmNsaWVudDp2MiIsImV4cCI6MTcyNDEwOTQ2OCwiaWF0IjoxNzI0MDg3ODY4fQ.DJ9GFl_yKAp2Qw-NVcBeRSnxIhqrwxhns5T5jU31N2tiHxCucKLSQ5guBygqkkJx6D0N_93f50meEEyfb7frbHhVHHwmRjHYjkfrWqHCpviwVjVZKKwl8Y3FEMb0bjKIB8p_E3txX9IbzeNGWRufZBRh2sxB5Q9B7XYINpVfh8s_sFvskrbDu5c01neCx5kEagEW5CtE0_EXTgEb5FSr_SfQG3UUu_iwlkOggOh_kOP_5GueElf9jn-bYBMnpObyN5s-FzuHDG5Rtac5rvcWqVW2reEqFTHqLI4rVC7UKQb6DSvPBPV4AgrutAvk30CYgDsOQILVyrjniincp7r9Ww
    Accept: application/json
    User-Agent: Mozilla/5.0 (Apple TV; U; CPU AppleTV5,3 OS 11.0 like Mac OS X; en_US)
回應 — 可用
code language-https
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

{
    "profiles": {
        "TempPass_TEST40": {
            "notBefore": 1697718650206,
            "notAfter": 1697718710206,
            "issuer": "Adobe",
            "type": "temporary",
            "attributes": {
                "expiration_date": {
                    "value": 1697718710206,
                    "state": "plain"
                },
                "userID": {
                    "value": "temppass_0bdf451aa9c8fa60e80f6b99ab48310c73b480f1",
                    "state": "plain"
                }
            }
        }
    }
}
回應 — 超過期間限制
code language-https
HTTP/1.1 403 Forbidden

Content-Type: application/json;charset=UTF-8

{
    "status": 403,
    "code": "temporary_access_duration_limit_exceeded",
    "message": "The temporary access duration limit has been exceeded.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "authentication"
}
回應 — 無效的設定
code language-https
HTTP/1.1 500 Internal Server Error

Content-Type: application/json;charset=UTF-8

{
    "status": 500,
    "code": "invalid_configuration_temporary_access",
    "message": "The temporary access configuration is invalid.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "configuration"
}

3.選取促銷TempPass時,擷取特定程式碼的設定檔

要求
code language-https
GET /api/v2/REF30/profiles/code/XTC98W HTTP/1.1

    Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjNGZjM2U3ZS0xMmQ5LTQ5NWQtYjc0Mi02YWVhYzhhNDkwZTciLCJuYmYiOjE3MjQwODc4NjgsImlzcyI6ImF1dGguYWRvYmUuY29tIiwic2NvcGVzIjoiYXBpOmNsaWVudDp2MiIsImV4cCI6MTcyNDEwOTQ2OCwiaWF0IjoxNzI0MDg3ODY4fQ.DJ9GFl_yKAp2Qw-NVcBeRSnxIhqrwxhns5T5jU31N2tiHxCucKLSQ5guBygqkkJx6D0N_93f50meEEyfb7frbHhVHHwmRjHYjkfrWqHCpviwVjVZKKwl8Y3FEMb0bjKIB8p_E3txX9IbzeNGWRufZBRh2sxB5Q9B7XYINpVfh8s_sFvskrbDu5c01neCx5kEagEW5CtE0_EXTgEb5FSr_SfQG3UUu_iwlkOggOh_kOP_5GueElf9jn-bYBMnpObyN5s-FzuHDG5Rtac5rvcWqVW2reEqFTHqLI4rVC7UKQb6DSvPBPV4AgrutAvk30CYgDsOQILVyrjniincp7r9Ww
    AP-TempPass-Identity: eyJlbWFpbCI6ImZvb0BiYXIuY29tIn0=
    Accept: application/json
    User-Agent: Mozilla/5.0 (Apple TV; U; CPU AppleTV5,3 OS 11.0 like Mac OS X; en_US)
回應 — 可用
code language-https
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

{
    "profiles": {
        "flexibleTempPass": {
            "notBefore": 1697720528524,
            "notAfter": 1697720588524,
            "issuer": "Adobe",
            "type": "temporary",
            "attributes": {
                "remaining_resources": {
                    "value": 1,
                    "state": "plain"
                },
                "used_assets": {
                    "value": [
                        "res04",
                        "res02",
                        "res03",
                        "res01"
                    ],
                    "state": "plain"
                },
                "expiration_date": {
                    "value": 1697720528524,
                    "state": "plain"
                },
                "userID": {
                    "value": "temppass_0bdf451aa9c8fa60e80f6b99ab48310c73b480f1",
                    "state": "plain"
                }
            }
        }
    }
}
回應 — 超過期間限制
code language-https
HTTP/1.1 403 Forbidden

Content-Type: application/json;charset=UTF-8

{
    "status": 403,
    "code": "temporary_access_duration_limit_exceeded",
    "message": "The temporary access duration limit has been exceeded.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "authentication"
}
回應 — 超出資源限制
code language-https
HTTP/1.1 403 Forbidden

Content-Type: application/json;charset=UTF-8

{
    "status": 403,
    "code": "temporary_access_resources_limit_exceeded",
    "message": "The temporary access resources limit has been exceeded.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "authentication"
}
回應 — 無效的設定
code language-https
HTTP/1.1 500 Internal Server Error

Content-Type: application/json;charset=UTF-8

{
    "status": 500,
    "code": "invalid_configuration_temporary_access",
    "message": "The temporary access configuration is invalid.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "configuration"
}
回應 — 無效的身分
code language-https
HTTP/1.1 400 Bad Request

Content-Type: application/json;charset=UTF-8

{
    "status": 400,
    "code": "invalid_header_identity_for_temporary_access",
    "message": "The identity for temporary access header value is missing or invalid.",
    "helpUrl": "https://experienceleague.adobe.com/docs/pass/authentication/auth-features/error-reportn/enhanced-error-codes.html?lang=zh-Hant",
    "action": "none"
}

4.套用降級時擷取特定程式碼的設定檔

要求
code language-https
GET /api/v2/REF30/profiles/code/XTC98W HTTP/1.1

    Authorization: Bearer eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjNGZjM2U3ZS0xMmQ5LTQ5NWQtYjc0Mi02YWVhYzhhNDkwZTciLCJuYmYiOjE3MjQwODc4NjgsImlzcyI6ImF1dGguYWRvYmUuY29tIiwic2NvcGVzIjoiYXBpOmNsaWVudDp2MiIsImV4cCI6MTcyNDEwOTQ2OCwiaWF0IjoxNzI0MDg3ODY4fQ.DJ9GFl_yKAp2Qw-NVcBeRSnxIhqrwxhns5T5jU31N2tiHxCucKLSQ5guBygqkkJx6D0N_93f50meEEyfb7frbHhVHHwmRjHYjkfrWqHCpviwVjVZKKwl8Y3FEMb0bjKIB8p_E3txX9IbzeNGWRufZBRh2sxB5Q9B7XYINpVfh8s_sFvskrbDu5c01neCx5kEagEW5CtE0_EXTgEb5FSr_SfQG3UUu_iwlkOggOh_kOP_5GueElf9jn-bYBMnpObyN5s-FzuHDG5Rtac5rvcWqVW2reEqFTHqLI4rVC7UKQb6DSvPBPV4AgrutAvk30CYgDsOQILVyrjniincp7r9Ww
    Accept: application/json
    User-Agent: Mozilla/5.0 (Apple TV; U; CPU AppleTV5,3 OS 11.0 like Mac OS X; en_US)
回應 — AuthNAll降級
code language-https
HTTP/1.1 200 OK

Content-Type: application/json;charset=UTF-8

{
    "profiles": {
        "${degradedMvpd}": {
            "notBefore": 1697719042666,
            "notAfter": 1697719102666,
            "issuer": "Adobe",
            "type": "degraded",
            "attributes":
                "userID": {
                    "value": "95cf93bcd183214a0bdf451aa9c8fa60e80f6b99ab48310c73b480f1",
                    "state": "plain"
                }
            }
        }
    }
}
note important
IMPORTANT
95cf93bcd183214a是降級特定的首碼。
recommendation-more-help
3f5e655c-af63-48cc-9769-2b6803cc5f4b