Users

Activate a new OTP key and method for a user

post/v1/api/users/{userExternalId}/second-factor/activate

Path parameters

userExternalIdstring required

Request body

string required

Response

OK

disabledboolean
emailstring
external_idstring
featuresstring
last_logged_in_atstring date-time
login_counterinteger
otp_keystring
passwordstring
provisional_otp_keystring
provisional_otp_key_created_atstring date-time
second_factor'SMS' | 'APP'
session_versioninteger
telephone_numberstring

Example response

{
  "_links": [
    {
      "href": "https://an.example.link",
      "method": "GET",
      "rel": "self"
    }
  ],
  "email": "user@somegovernmentdept.gov.uk",
  "external_id": "93ba1ec4ed6a4238a59f16ad97b4fa12",
  "features": "feature1, feature2",
  "last_logged_in_at": "2022-04-06T23:03:41.665Z",
  "otp_key": "43c3c4t",
  "provisional_otp_key": "FC5IHFH2CFSKEZBBXTYEGQXQOH344LLO",
  "second_factor": "SMS",
  "service_roles": [
    {
      "role": {
        "description": "Administrator",
        "name": "admin",
        "permissions": [
          {
            "description": "Revokekey",
            "name": "tokens:delete"
          }
        ]
      },
      "service": {
        "_links": [
          {
            "href": "https://an.example.link",
            "method": "GET",
            "rel": "self"
          }
        ],
        "archived_date": "2023-04-09T18:07:46.568Z",
        "collect_billing_address": true,
        "created_date": "2022-04-01T12:07:46.568Z",
        "current_go_live_stage": "NOT_STARTED",
        "current_psp_test_account_stage": "NOT_STARTED",
        "custom_branding": {
          "css_url": "css url",
          "image_url": "image url"
        },
        "default_billing_address_country": "GB",
        "external_id": "7d19aff33f8948deb97ed16b2912dcd3",
        "gateway_account_ids": [
          "1"
        ],
        "merchant_details": {
          "address_city": "London",
          "address_country": "GB",
          "address_line1": "Address line 1",
          "address_line2": "Address line 2",
          "address_postcode": "E1 8XX",
          "email": "email@example.com",
          "name": "organisation name",
          "telephone_number": "447700900000",
          "url": "http://www.example.org"
        },
        "name": "Some service name",
        "sector": "local government",
        "service_features": {
          "govuk_psp_is_adyen": {
            "enabled": true
          }
        },
        "service_name": {
          "cy": "Service name in welsh",
          "en": "Some service name"
        },
        "went_live_date": "2022-04-09T18:07:46.568Z"
      }
    }
  ],
  "telephone_number": "447700900000"
}

Changes

Changed in 12 of the 53 revisions of this API.11312

    • the service_roles/items/service/service_features response's property type/format changed from array/ to object/ for status 200

      response-property-type-changed

    • added the optional property service_roles/items/service/service_features to the response with the 200 status

      response-optional-property-added

    • added the new CHOSEN_PSP_ADYEN enum value to the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-added

    • added the new TERMS_AGREED_ADYEN enum value to the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-added

    • added the new admin enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the new super-admin enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the new view-and-initiate-moto enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the new view-and-refund enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the new view-only enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the new view-refund-and-initiate-moto enum value to the service_roles/items/role/name response property for the response status 200

      response-property-enum-value-added

    • added the optional property service_roles/items/service/archived_date to the response with the 200 status

      response-optional-property-added

    • removed the optional property username from the response with the 200 status

      response-optional-property-removed

    • removed the CHOSEN_PSP_EPDQ enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • removed the CHOSEN_PSP_SMARTPAY enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • removed the CHOSEN_PSP_WORLDPAY enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • removed the TERMS_AGREED_EPDQ enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • removed the TERMS_AGREED_SMARTPAY enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • removed the TERMS_AGREED_WORLDPAY enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • added the new GOV_BANKING_MOTO_OPTION_COMPLETED enum value to the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-added

    • removed the CHOSEN_GOV_BANKING_MOTO enum value from the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-removed

    • added the new CHOSEN_GOV_BANKING_MOTO enum value to the service_roles/items/service/current_go_live_stage response property for the response status 200

      response-property-enum-value-added