How to lock or unlock authentication types using resident services?

Here we have documented the steps to perform lock and unlock of various authentication types in MOSIP.

Instructions

Step by step guide to perform lock and unlock

  1. Request for an OTP first using the MOSIP’s resident services generate OTP API
    Request URL

    POST: https:/{base_URL}/resident/v1/req/otp

    Request Body

    { "id": "mosip.identity.otp.internal", "individualId": "4279865235", "metadata": {}, "otpChannel": ["PHONE","EMAIL"], "requestTime": "2021-04-20T05:09:45.410Z", "transactionID": "1234567890", "version": "1.0" }

    Response Body

    { "id": "mosip.identity.otp.internal", "version": "1.0", "transactionID": "1234567890", "responseTime": "2021-04-20T05:09:55.221Z", "errors": null, "response": { "maskedMobile": "XXXXXX8538", "maskedEmail": "XXkXXiXXbXXaXXiXXnXX9@gmail.com" }, "metadata": null }
  2. Request for lock or unlock using a UIN or VID

    1. Request for locking of various authentication types
      Request URL

      Request Body

      Response Body

    2. Request for unlocking various authentication types
      Request URL

      Request Body

      Response Body

 

To test if locking or unlocking has happened or not please perform authentication on the respective locked or unlocked modalities.