Login

watch.auth.session.login

This API endpoint is used for authentication to watch a video on the Indee platform. Authentication can be done using a PIN, a username and password, or both, depending on the enterprise associated with the account.

Headers

The authorization header must carry the API key that was provided during application registration.

Header Value
Authorization Bearer api_key

Endpoint

POST v2/watch/auth/login

Request Body

Based on your enterprise configuration, you can send in the appropriate JSON body for authentication.

    {
        "type": "pin",
        "credentials": "<your creds>",
        "persist": true
    }
Parameter Type Description
type String Specifies the type of authentication. The allowed values are [pin, password].
credentials Object Specifies your authentication credentials. This can be PIN of username and password defined. See samples below.
persist Boolean Specifies if the user needs to be logged in for a longer period of time.

Sample Body (type = pin)

The following is a sample of a request body if you are authenticating using PIN:

    {
        "type": "pin",
        "credentials": {
            "pin": "BSGB7OE"
        },
        "persist": true
    }

Sample Body (type = password)

The following is a sample of a request body if you are authenticating using username and password:

    {
        "type": "password",
        "credentials": {
            "username": "watchuser@indee.tv",
            "password": "enteryourpassword"
        },
        "persist": true
    }

Response Body

This is the sample response body you will receive with the login API:

    {
        "status_code": "W0000",
        "token": "<your JWT token>",
        "refresh_token": "<your JWT refresh token>"
    }
Field Type Description
status_code Integer The Indee API status code. See the full list of codes in the Status Codes section.
token String The access token that can be used in subsequent API calls.
refresh_token String The refresh token that can be used in subsequent API calls.

Status Codes

Indee status code HTTP Response Code Description
W0000 HTTP 200 Success
W2000 HTTP 401 Authorization header was either not passed or there was some issue parsing it
W2001 HTTP 401 API key is invalid or expired, or is not fully configured
W2009 HTTP 401 ClientID header was either not passed or is malformed
W2100 HTTP 403 Origin domain is not whitelisted for this API key
W2108 HTTP 403 Watch product is inactive
W2102 HTTP 451 Request blocked by geofencing for the resolved region
W2002 HTTP 401 Invalid credentials
W2006 HTTP 401 The account's email address has not been verified
W2103 HTTP 403 Account locked out after repeated failed sign-in attempts
W4900 HTTP 400 Malformed request body
W5001 HTTP 429 Rate limited
W5000 HTTP 500 Unknown server error occurred