Retrieve authentication session using code retrieve-authentication-session-using-code

IMPORTANT
The content on this page is provided for information purposes only. Usage of this API requires a current license from Adobe. No unauthorized use is permitted.
IMPORTANT
REST API V2 implementation is bounded by the Throttling mechanism documentation.

Request request

HTTP
path
/api/v2/{serviceProvider}/sessions/{code}
method
GET
Path Parameters
serviceProvider
The internal unique identifier associated with the Service Provider during onboarding process.
required
code
The authentication code obtained after creating the authentication session on the streaming device.
required
Headers
Authorization
The generation of the bearer token payload is described in the Authorization header documentation.
required
X-Forwarded-For
The IP address of the streaming device.

It is strongly recommended to always use it for server to server implementations, particularly when the call is made by the programmer service rather than the streaming device.

For client to server implementations, the IP address of the streaming device is sent implicitly.
optional
Accept
The media type accepted by the client application.

If specified, it must be application/json.
optional
User-Agent
The user agent of the client application.
optional

Response response

Code
Text
Description
200
OK
The response body contains information about the authentication session.
400
Bad Request
The request is invalid, the client needs to correct the request and try again. The response body may contain error information that adheres to the Enhanced Error Codes documentation.
401
Unauthorized
The access token is invalid, the client needs to obtain a new access token and try again. For more details refer to the Dynamic Client Registration Overview documentation.
405
Method Not Allowed
The HTTP method is invalid, the client needs to use an HTTP method that is permitted for the requested resource and try again. For more details refer to the Request section.
500
Internal Server Error
The server side encountered an issue. The response body may contain error information that adheres to the Enhanced Error Codes documentation.

Success success

Headers
Status
200
required
Body
parameters

JSON object having the following attributes:

  • existing
    The existing parameters that were already provided.
  • missing
    The missing parameters that need to be provided in order to complete the authentication flow.
required

Error error

Headers
Status
400, 401, 405, 500
required
Content-Type
application/json
required
Body
The response body may provide additional error information that adheres to the Enhanced Error Codes documentation.
required

Samples samples

1. Retrieve authentication session without missing parameters

Request
code language-https
GET /api/v2/sessions/REF30/8BLW4RW 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)
Response
code language-https
HTTP/1.1 200 OK

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

{
    "parameters": {
        "existing": {
            "mvpd": "Cablevision",
            "domain": "adobe.com"
            "redirectUrl": "https://www.adobe.com"
        }
}

1. Retrieve authentication session with missing parameters

Request
code language-https
GET /api/v2/sessions/REF30/8BLW4RW 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)
Response
code language-https
HTTP/1.1 200 OK

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

{
    "parameters": {
        "existing": {
            "mvpd": "Cablevision",
            "domain": "adobe.com"
        },
        "missing": ["redirectUrl"]
}
recommendation-more-help
3f5e655c-af63-48cc-9769-2b6803cc5f4b