> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List IDV Sessions for a User

> Retrieve key details of all hosted KYC/KYC sessions attempted for a user

### Path parameters

<ParamField path="UserId" type="string" required>
  The unique identifier of the user.
</ParamField>

### Responses

<AccordionGroup>
  <Accordion title="200" defaultOpen>
    <ResponseField name="Id" type="string">
      Max length: 128 characters (see [data formats](/api-reference/overview/data-formats) for details)

      The unique identifier of the object.
    </ResponseField>

    <ResponseField name="Status" type="string">
      The status of the overall IDV Session:

      * `PENDING` – The unique `HostedUrl` for the session has not yet been submitted by the user. This temporary state can transition to `VALIDATED`, `REFUSED`, `REVIEW`, or `EXPIRED`.
      * `REVIEW` – One or more automated checks was neither successful nor refused, so the session was sent for manual review by Mangopay’s teams. This temporary state is only applicable to Legal users and can transition to `REFUSED` or `VALIDATED`.
      * `VALIDATED` – - The session was validated and the User became KYC/KYB verified (indicated by the User object’s `KYCLevel`). When the `Status` changes to `VALIDATED`, the [verified data](/guides/users/verification/hosted#verified-data) in `Checks.Data` is used to replace existing data in the User object.
      * `REFUSED` – The session was refused and the User is not KYC/KYB verified. The `Checks.CheckStatus` shows which checks were `REFUSED` and the `Checks.Reasons` shows the [refused reason types](/guides/users/verification/hosted#refusals) and comment (which is custom text in the case of manual review for Legal users).
      * `EXPIRED` – The session was not submitted within 7 days of the `CreationDate` and no longer can be. Note however that the `HostedUrl` link remains accessible.
      * `OUT_OF_DATE` – The session is not valid because the user’s KYC/KYB verification status was [downgraded](/guides/users/verification/downgrade) by Mangopay.
    </ResponseField>

    <ResponseField name="CreationDate" type="Unix timestamp">
      The date and time at which the object was created.
    </ResponseField>

    <ResponseField name="LastUpdate" type="Unix timestamp">
      The date and time at which the session was last updated.
    </ResponseField>
  </Accordion>
</AccordionGroup>

<ResponseExample>
  ```json REST  theme={null}
  [
      {
          "Id": "idnver_01JTG8BTG92TTRP5VSNV35ZYGM",
          "Status": "PENDING",
          "CreationDate": 1746449121,
          "LastUpdate": null
      },
      {
          "Id": "idnver_01JTGAXGJRVNCD9K4CEM311M4Z",
          "Status": "REFUSED",
          "CreationDate": 1746449852,
          "LastUpdate": 1746449945
      }
  ]
  ```
</ResponseExample>

<RequestExample>
  ```json REST theme={null}
  // GET has no body parameters
  ```

  ```java Java theme={null}
  import com.mangopay.MangoPayApi;
  import com.mangopay.core.Pagination;
  import com.mangopay.entities.IdentityVerification;

  import java.util.List;

  public class GetIdentityVerificationsByUser {
      public static void main(String[] args) throws Exception {
          MangoPayApi mangopay = new MangoPayApi();
          mangopay.getConfig().setClientId("your-client-id");
          mangopay.getConfig().setClientPassword("your-api-key");

          String userId = "user_m_01KMD8QZHCVY2VPYV020RDBZGA";
          
          // optional Pagination
          Pagination pagination = new Pagination(1, 10);

          List<IdentityVerification> result = mangopay.getIdentityVerificationApi().getAll(userId, pagination);
      }
  }
  ```

  ```javascript NodeJS theme={null}
  const mangopayInstance = require('mangopay4-nodejs-sdk');
  const mangopay = new mangopayInstance({
      clientId: 'your-client-id',
      clientApiKey: 'your-api-key',
  });

  const userId = 'user_m_01KMD8QZHCVY2VPYV020RDBZGA';

  const getIdentityVerificationsByUser = async (userId) => {
      return await mangopay.IdentityVerifications.getAll(userId)
          .then((response) => {
              console.info(response);
              return response;
          })
          .catch((err) => {
              console.log(err);
              return false;
          });
  };

  getIdentityVerificationsByUser(userId);
  ```

  ```ruby Ruby theme={null}
  require 'mangopay'

  MangoPay.configure do |client|
    client.preproduction = true
    client.client_id = 'your-client-id'
    client.client_apiKey = 'your-api-key'
    client.log_file = File.join(Dir.pwd, 'mangopay.log')
  end

  def get_identity_verifications_by_user(user_id)
    begin
      response = MangoPay::IdentityVerification.get_all(user_id)
      puts response
      return response
    rescue MangoPay::ResponseError => error
      puts "Failed to get IdentityVerifications by user: #{error.message}"
      puts "Error details: #{error.details}"
      return false
    end
  end

  user_id = 'user_m_01KMD8QZHCVY2VPYV020RDBZGA'

  get_identity_verifications_by_user(user_id)
  ```

  ```python Python theme={null}
  import mangopay

  mangopay.client_id='your-client-id'
  mangopay.apikey='your-api-key'

  from mangopay.api import APIRequest
  handler = APIRequest(sandbox=True)

  from mangopay.resources import IdentityVerification

  user_id = 'user_m_01KMD8QZHCVY2VPYV020RDBZGA'

  result = IdentityVerification.get_all(user_id)
  ```

  ```php PHP theme={null}
  <?php

  require_once 'vendor/autoload.php';

  use MangoPay\Libraries\Exception as MGPException;
  use MangoPay\Libraries\ResponseException as MGPResponseException;
  use MangoPay\MangoPayApi;

  $api = new MangoPayApi();

  $api->Config->ClientId = 'your-client-id';
  $api->Config->ClientPassword = 'your-api-key';
  $api->Config->TemporaryFolder = 'tmp/';

  try {
      $userId = 'user_m_01KMD8QZHCVY2VPYV020RDBZGA';
      
      $response = $api->IdentityVerifications->GetAll($userId);

      print_r($response);
  } catch (MGPResponseException $e) {
      print_r($e);
  } catch (MGPException $e) {
      print_r($e);
  }
  ```

  ```csharp .NET theme={null}
  using System.Threading.Tasks;
  using MangoPay.SDK;

  class GetIdentityVerificationsByUser
  {
      static async Task Main(string[] args)
      {
          MangoPayApi api = new MangoPayApi();

          api.Config.ClientId = "your-client-id";
          api.Config.ClientPassword = "your-api-key";

          var userId = "user_m_01KMD8QZHCVY2VPYV020RDBZGA";

          var result = await api.IdentityVerifications.GetAllAsync(userId);
      }
  }
  ```
</RequestExample>
