> ## Documentation Index
> Fetch the complete documentation index at: https://developer.sandbox.co.in/llms.txt
> Use this file to discover all available pages before exploring further.

# Get User Profile

> Gets the User Profile Details from Digilocker like Name, Date of Birth, Gender, Mobile Number, Email Id.

<Card title="Run in Postman" icon="https://mintcdn.com/sandboxfinancialtechnologiesprivatelimited/gviqebbpT5NUt_6i/static/svg/Postman.svg?fit=max&auto=format&n=gviqebbpT5NUt_6i&q=85&s=da47f2b7e10d87befec951aed9468de3" horizontal arrow="true" href="https://www.postman.com/in-co-sandbox/workspace/sandbox-api/request/29708799-bff85a46-2e23-4988-89cc-d8418ee6663b?action=share&source=copy-link&creator=29708799&ctx=documentation" width="2030" height="2031" data-path="static/svg/Postman.svg" />

<Info>
  User profile details can only be fetched if the user has provided consent for it.
</Info>


## OpenAPI

````yaml api-reference/kyc/openapi.json GET /kyc/digilocker/sessions/{session_id}/user/profile
openapi: 3.1.0
info:
  title: in-co-sandbox-kyc
  description: ''
  version: 1.0.0
servers:
  - url: https://test-api.sandbox.co.in
    description: test
  - url: https://api.sandbox.co.in
    description: prod
security: []
tags:
  - name: kyc
  - name: digilocker-sdk
  - name: digilocker
  - name: aadhaar
  - name: bank
  - name: pan
  - name: mca
  - name: entitylocker
  - name: entitylocker-sdk
paths:
  /kyc/digilocker/sessions/{session_id}/user/profile:
    get:
      tags:
        - kyc
        - digilocker
      summary: Get User Profile
      description: Gets the User Profile Details from Digilocker.
      operationId: getUserProfile
      parameters:
        - name: session_id
          in: path
          description: >-
            Session identifier generated during DigiLocker [Initiate Session
            API](https://developer.sandbox.co.in/api-reference/kyc/digilocker/endpoints/initiate_session)
            .
          required: true
          example: '{{session_id}}'
          schema:
            type: string
        - name: Authorization
          in: header
          description: >-
            JWT access token. For token-generation steps, refer to the
            [Quickstart
            Guide](https://developer.sandbox.co.in/guides/get-started/quickstart).
          required: true
          example: '{{access_token}}'
          schema:
            type: string
        - name: x-api-key
          in: header
          description: API key used to identify and authenticate the client.
          required: true
          example: '{{api_key}}'
          schema:
            type: string
        - name: x-api-version
          in: header
          description: Specifies the API version for the request.
          required: false
          example: 1.0.0
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      Unix timestamp (in milliseconds) indicating when the
                      server generated the response.
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Digilocker Id
                      '@entity':
                        type: string
                        description: >-
                          Entity identifier that specifies the type of response
                          being returned.
                      date_of_birth:
                        type: integer
                        description: Date of Birth of User
                      mobile:
                        type: string
                        description: Mobile Number of User
                      name:
                        type: string
                        description: Full Name of User
                      gender:
                        type: string
                        description: Gender of User
                        enum:
                          - male
                          - female
                          - transgender
                      eaadhaar:
                        type: boolean
                        description: Boolean indicating eaadhaar status of User
                      email:
                        type: string
                        description: Email Address of User
                    required:
                      - '@entity'
                      - id
                      - name
                      - date_of_birth
                      - gender
                      - eaadhaar
                      - mobile
                      - email
                    description: >-
                      Response payload containing the requested data or error
                      details.
                  transaction_id:
                    type: string
                    description: Unique identifier for tracking the request across systems.
                required:
                  - code
                  - timestamp
                  - data
                  - transaction_id
              examples:
                200 - OK:
                  summary: 200 - OK
                  value:
                    code: 200
                    timestamp: 1744874068219
                    data:
                      id: b5522c8f-2321-577b-8e73-ae1366d9c591
                      '@entity': in.co.sandbox.kyc.digilocker.user.profile
                      date_of_birth: 1071145000000
                      mobile: '9825013730'
                      name: Kaival Mehta
                      gender: male
                      eaadhaar: true
                    transaction_id: 0793c784-fcaa-44d9-b8fc-f6a382a67f70
          headers: {}
        '429':
          description: >-
            There were too many requests to DigiLocker. Wait, then send the
            request again.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 429
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Too Many Requests:
                  summary: Too Many Requests
                  value:
                    code: 429
                    timestamp: 1782806266274
                    message: Too Many Requests
                    transaction_id: e4f5a6b7-3333-4a5b-8c6d-7e8f9a0b1c2d
          headers: {}
        '500':
          description: The request failed.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 500
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Failed to get user details:
                  summary: Failed to get user details
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Failed to get user details
                    transaction_id: e4f5a6b7-4444-4a5b-8c6d-7e8f9a0b1c2d
                Failed to expire session:
                  summary: Failed to expire session
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Failed to expire session
                    transaction_id: e4f5a6b7-4444-4a5b-8c6d-7e8f9a0b1c2d
                Internal Server Error:
                  summary: Internal Server Error
                  value:
                    code: 500
                    timestamp: 1782806266274
                    message: Internal Server Error
                    transaction_id: e4f5a6b7-4444-4a5b-8c6d-7e8f9a0b1c2d
          headers: {}
        '503':
          description: DigiLocker is not available. Send the request again later.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 503
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Source Unavailable:
                  summary: Source Unavailable
                  value:
                    code: 503
                    timestamp: 1000000000000
                    message: Source Unavailable
                    transaction_id: 6c05f692-c32f-4de0-92b4-56684bdf16f0
          headers: {}
        '521':
          description: The server cannot find a session with this `session_id`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 521
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                Data not found:
                  summary: Data not found
                  value:
                    code: 521
                    timestamp: 1782806266274
                    message: 'Data not found for: 196c64a5-8cfb-45dd-a51c-0c8534774d07'
                    transaction_id: a599615c-c732-4538-9840-4bb5cd3c19d2
          headers: {}
        '523':
          description: >-
            The session cannot be used. Either the session did not complete the
            DigiLocker consent flow, or the DigiLocker access token is no longer
            valid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    const: 523
                    description: The HTTP status code.
                  timestamp:
                    type: integer
                    description: >-
                      The time of the response. The unit is milliseconds from
                      the Unix epoch.
                  message:
                    type: string
                    description: The error message.
                  transaction_id:
                    type: string
                    description: The unique identifier of the request.
                required:
                  - code
                  - timestamp
                  - message
                  - transaction_id
              examples:
                'Invalid session status: created':
                  summary: 'Invalid session status: created'
                  value:
                    code: 523
                    timestamp: 1782806266274
                    message: 'Invalid session status: created'
                    transaction_id: e4f5a6b7-5555-4a5b-8c6d-7e8f9a0b1c2d
                Session expired:
                  summary: Session expired
                  value:
                    code: 523
                    timestamp: 1782806266274
                    message: Session expired
                    transaction_id: e4f5a6b7-5555-4a5b-8c6d-7e8f9a0b1c2d
          headers: {}
      deprecated: false
      security: []

````