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

Deleting an existing user profile

Request

To delete an existing user profile, send a POST request to:

Bash
https://<host>:<port>/ups/v2/user/userprofiles/{profileId}/actions/delete

The request will fail if:

  • The user profile that is in use is a child profile. A profile can only be deleted by a non-child user.

  • The profile to be deleted is the default profile.

  • The profile to be deleted is the profile that is in use.

By default the platform checks the parental PIN on this request. See Server-side PIN checks in PIN and parental control management.

The earlier version of this request, DELETE /ups/v1/user/userprofiles/{profileId}, is deprecated. It doesn't check the PIN.

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.

  • Content-Type: application/json

  • x-correlation-id – identifier for logging, to correlate messages across a call flow

Mandatory arguments

  • profileId (in URL) – the ID of the profile to be deleted

Other arguments

  • pin (in body) – the PIN that the user entered. Required when the platform checks the PIN (the default). Otherwise it is ignored.

Example

A request with this payload deletes the profile in the URL:

JSON
{
  "pin": "1234"
}

Response

A successful request returns an HTTP 200 status, for example:

JSON
{
  "matchedCount": 1,
  "deletedCount": 1
}

A bad request returns an HTTP 400 status – for example:

  • "errorCode": 4106 – a PIN is required but the request has no pin.

  • "errorCode": 8125 – the profile is the one in use.

  • "errorCode": 8126 – the profile is the default profile.

  • "errorCode": 8127 – the profile in use is a child profile.

An unauthorised request returns an HTTP 401 status ("errorCode": 1001) if the account has no PIN of the type that is checked.

A forbidden request returns an HTTP 403 status – for example, if the PIN is wrong ("errorCode": 4566), if the PIN is locked or only a limited number of attempts are left ("errorCode": 7123), or if the access token is missing, invalid, or has expired.

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

See also

For full details of this API, see the User Profiles Service (UPS) API documentation.