OpenTV ENTera & OpenTV Platform Documentation
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2
26.26_Q2 25.52_Q4 25.26_Q2 25.12_Q1 24.50_Q4 24.38_Q3 24.26_Q2 23.50_Q4 23.24_Q2 23.12_Q1 22.50_Q4 22.38_Q3 22.24_Q2

Getting the status of all PINs for the account

Request

To get the status of all the PINs for the account, send a GET request to:

Bash
https://<host>:<port>/adm/v1/user/accounts/pins/status

The client application uses this information to:

  • Tell the user that a PIN is locked and how long the lock lasts. (The platform enforces the lock – requests that check the PIN are refused until it ends.)

  • Make sure that the user sets a PIN that is mandatory and that has not been set yet.

Headers

  • Authorization – the client's access token, as a bearer token (Bearer <access token>). This is the access_token that the client gets when it signs in – see Authentication token. This header is mandatory.

Mandatory arguments

None.

Other arguments

None.

Response

A successful request returns an HTTP 200 status. The response body has one item in resourceSet for each PIN type that is defined on the platform, for example:

JSON
{
  "totalRecords": 2,
  "resourceSet": [
    {
      "pinType": "ParentalPin",
      "status": "SET",
      "extendedStatus": "OPTIONAL",
      "lockTimeRemaining": 0
    },
    {
      "pinType": "PurchasePin",
      "status": "UNSET",
      "extendedStatus": "MANDATORY",
      "lockTimeRemaining": 0
    }
  ]
}

Each item can have the following fields:

  • pinType – the PIN type

  • status – the PIN status, one of:

    • UNSET – the PIN has not been set yet (the default if the operator did not set the PIN when the account was provisioned)

    • SET – the PIN has been set

    • LOCKED – the PIN is locked because the wrong PIN was entered too many times. The status stays LOCKED until the next request that checks the PIN after the lock has ended, so LOCKED with a lockTimeRemaining of 0 means that the user can try again.

  • extendedStatus – whether the PIN is MANDATORY or OPTIONAL. A client application normally knows whether a PIN is mandatory, but this lets it find out for a new PIN type.

  • lockTimeRemaining – the time until the user can try entering the PIN again, in seconds. Default: 0 (when status is not LOCKED).

A forbidden request returns an HTTP 403 status – for example, if the access token is missing, invalid, or has expired.

If the account does not exist, the request returns an HTTP 404 status ("errorCode": 1001).

See also

For full details of this API, see Account and Device Manager (ADM) API documentation.