Request
To get the status of all the PINs for the account, send a GET request to:
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 theaccess_tokenthat 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:
{
"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 staysLOCKEDuntil the next request that checks the PIN after the lock has ended, soLOCKEDwith alockTimeRemainingof0means that the user can try again.
-
-
extendedStatus– whether the PIN isMANDATORYorOPTIONAL. 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(whenstatusis notLOCKED).
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.