检索特定代码的配置文件 retrieve-profile-for-specific-code

IMPORTANT
此页面上的内容仅供参考。 使用此API需要来自Adobe的当前许可证。 不允许未经授权使用。
IMPORTANT
REST API V2实施受限制机制文档限制。

请求 request

HTTP
路径
/api/v2/{serviceProvider}/profiles/code/{code}
方法
GET
路径参数
serviceProvider
在载入过程中与服务提供商关联的内部唯一标识符。
必填
代码
在流设备上创建身份验证会话后获得的身份验证代码。
必填
标头
授权
授权标头文档中描述了持有者令牌有效负载的生成。
必填
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(例如,频谱、有线电视等)
    创建配置文件的原因是:基本身份验证。
  • 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-Hans",
    "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-Hans",
    "action": "configuration"
}

3.在选择了“促销临时传递”时,检索特定代码的配置文件

请求
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-Hans",
    "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-Hans",
    "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-Hans",
    "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-Hans",
    "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