Request
To verify the PIN that the user has supplied, send a POST request to:
https://<host>:<port>/adm/v1/user/accounts/actions/validatePin
This request will fail if the PIN's status is LOCKED. You can check the status of each PIN as described in Getting the status of all PINs for the account. Wrong PINs in requests to change the PIN (see Changing a PIN) count towards the same lockout. NAGRAVISION sets the number of attempts and the lock time for each deployment. A correct PIN resets the count of wrong attempts.
Headers
-
Authorization– the client's access token, as a bearer token (Bearer <access token>). This is theaccess_tokenthat the client gets when it signs in – see Authentication token. This header is mandatory. -
Content-Type: application/json
Mandatory arguments
All the following arguments are in the request body:
-
type– the PIN type, for example the parental PIN -
value– the PIN that the user entered
Example
A POST request with this payload checks whether the supplied PIN value is correct for the specified PIN type:
{
"type": "ParentalPin",
"value": "1A2B3C4D5E"
}
Response
A successful request returns an HTTP 200 status.
If the PIN is wrong, the request returns an HTTP 403 status:
-
"errorCode": 4566– the PIN is wrong (no lockout is configured for this PIN type). -
"errorCode": 7123– the PIN is wrong and the message gives the number of attempts left, or the PIN is locked (the message gives the number of seconds remaining).
If the account has no PIN of the specified type, the request returns an HTTP 401 status ("errorCode": 1001).
Before 26.26, a wrong PIN returned an HTTP 401 status. If your client checks for 401 to detect a wrong PIN, update it to handle 403.
See also
For full details of this API, see Account and Device Manager (ADM) API documentation.