Skip to main content
Skip table of contents

Switching to a different user profile

Request

To switch to a different user profile, send a POST request to:

CODE
https://<host>:<port>/ias/v3/token/actions/changeUserProfile

This returns an access token containing the details of the user profile that was switched to.

If the user is trying to switch from a child user profile to an adult user profile, the client application must prompt for the parental PIN (if one is set) and validate that the PIN that the user enters is correct before sending this request.
See Verifying user-supplied PINs.

By default, after switching to a profile, that profile remains in use unless the client explicitly calls this endpoint to switch to a different one.
If you need different behaviour (for example, to apply a time limit to the use of a non-child profile to prevent a child from using a this profile because it happens to be the last one that was used), you are responsible for implementing this behaviour in your client application.

Headers

  • Authorization – access token generated during sign-on

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

Mandatory arguments

  • newUserProfileId – the ID of the profile to be switched to

Optional arguments

None

Response

A successful request returns an HTTP 200 status with the updated token in the response body.

An invalid request returns an HTTP 400 status.

A forbidden request returns an HTTP 403 status.

Example

A successful request returns a payload that looks like this:

JSON
{
  "access_token": {
    "typ": "DevAuthN",
    "ver": "1.0",
    "exp": 154826071,
    "fixed_exp": 1550679912,
    "tenantId": "nagra",
    "accountId": "account7",
    "userId": "user7",
    "deviceId": "device7",
    "playoutDeviceClass": "playoutDeviceClass01",
    "jti": "4789023423714089478",
    "geoBlockExempt": false,
    "sessionControl": {
      "groups": [
        {
          "groupId": "Group_RTL",
          "maxSessions": 5
        }
      ],
      "groupId": "null",
      "sessionControlEnabled": true,
      "maxSessions": 5
    },
    "parentalControl": {
      "ratingThreshold": {
        "FSK": "fsk12",
        "TVPG": "TV-MA"
      }
    },
    "accountProfileId": "accountProfile7",
    "deviceInformation": {
      "device": {
        "hardware": {
          "model": "Iphone"
        },
        "OS": {
          "type": "IOS"
        }
      }
    },
    "onNetwork": false,
    "filteringInformation": {
      "country": "united kingdom",
      "country-code": "GB",
      "numeric-country-code": "826",
      "region-full-name": "essex",
      "metro-name": "ITV Anglia",
      "metro-code": "826043",
      "city-name": "colchester",
      "postal-code": "co1 1aa",
      "billing-country-code": "GB",
      "filter-string": "Li150"
    },
    "blockingInformation": {
      "country": "united kingdom",
      "country-code": "GB",
      "numeric-country-code": "826",
      "region-full-name": "essex",
      "metro-name": "ITV Anglia",
      "metro-code": "826043",
      "city-name": "colchester",
      "postal-code": "co1 1aa",
      "billing-country-code": "GB",
      "filter-string": "Li150"
    },
    "watermarking": false
  },
  "refresh_token": {
    "typ": "RefreshAuthN",
    "ver": "1.0",
    "exp": 154826071,
    "fixed_exp": 1550679912,
    "tenantId": "nagra",
    "accountId": "account7",
    "accountProfileId": "accountProfile7",
    "userId": "user7",
    "deviceId": "device7",
    "playoutDeviceClass": "playoutDeviceClass01",
    "jti": "4789023423714089478",
    "sessionControl": {
      "groups": [
        {
          "groupId": "Group_RTL",
          "maxSessions": 5
        }
      ],
      "groupId": "null",
      "sessionControlEnabled": true,
      "maxSessions": 5
    }
  },
  "client_id": "client7",
  "accountId": "account7",
  "token_type": "Bearer",
  "expires_in": 3887999,
  "refresh_expires_in": 1548260712,
  "fixed_refresh_expires_in": 1548260712,
  "parentalControl": {
    "ratingThreshold": {
      "FSK": "fsk12",
      "TVPG": "TV-MA"
    }
  }
}

See also

Identity Authentication Service (IAS) API documentation

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.