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

# Fetch User Details From Access Token

> Use this API to retrieve user details by passing a valid access token fetched from the [OAuth Access Token Generation API](https://www.cashfree.com/docs/api-reference/vrs/v2/1-click-onboarding/oauth-access-token-generation#oauth-access-token-generation). 

This endpoint fetches the information associated with the authenticated user.



## OpenAPI

````yaml get /oauth2/user-details
openapi: 3.0.0
info:
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  contact:
    email: developers@cashfree.com
    name: API Support
    url: https://discord.com/invite/QdZkNSxXsB
  title: Cashfree Verification API's.
  version: '2023-12-18'
  description: >-
    Cashfree's Verification APIs provide different types of verification to our
    merchants.
servers:
  - description: Sandbox Server
    url: https://sandbox.cashfree.com/verification
  - description: Production Server
    url: https://api.cashfree.com/verification
security: []
tags:
  - name: Aadhaar
    description: Operations related to Aadhaar verification.
  - name: BAV V2
    description: Operations related to Bank account verification v2.
  - name: PAN
    description: Operations related to PAN verification.
  - name: Digilocker
    description: Operations related to Digilocker verification.
  - name: E-sign
    description: Operations related to E-sign verification.
  - name: Reverse Penny Drop
    description: Operations related to Reverse Penny Drop verification.
  - name: UPI Penny Drop
    description: Operations related to UPI Penny Drop verification.
  - name: Mobile Penny Drop
    description: Operations related to Mobile Penny Drop verification.
  - name: IP
    description: Operation related to IP verification.
  - name: UPI
    description: Operations related to UPI verification.
  - name: Passport
    description: Operation related to Passport verification.
  - name: CIN
    description: Operation related to CIN verification.
  - name: Name Match
    description: Operation related to Name Match verification.
  - name: PAN to GSTIN
    description: Operation related to PAN to GSTIN.
  - name: Face Match
    description: Operation related to Face Match verification.
  - name: Voter ID
    description: Operation related to Voter ID verification.
  - name: Reverse Geocoding
    description: Operation related to Reverse Geocoding.
  - name: Vehicle RC
    description: Operation related to Vehicle RC verification.
  - name: Driving License
    description: Operation related to Driving License verification.
  - name: GSTIN
    description: Operation related to GSTIN verification.
  - name: Account Aggregator
    description: Operations related to Account aggregator.
  - name: OTPLess
    description: Operations related to OTPLess Verification.
  - name: 1-Click
    description: Operations related to 1-Click.
  - name: Smart OCR
    description: Operations related to Smart OCR.
  - name: Geocoding
    description: Operations related to Geocoding.
  - name: Udyam
    description: Operation related to Udyam verification.
  - name: PAN to Udyam
    description: Operation related to PAN to Udyam.
paths:
  /oauth2/user-details:
    get:
      tags:
        - 1-Click
      summary: Fetch User Details From Access Token
      description: >-
        Use this API to retrieve user details by passing a valid access token
        fetched from the [OAuth Access Token Generation
        API](https://www.cashfree.com/docs/api-reference/vrs/v2/1-click-onboarding/oauth-access-token-generation#oauth-access-token-generation). 


        This endpoint fetches the information associated with the authenticated
        user.
      operationId: VrsUserVaultFetchDetailsFromAccessToken
      parameters:
        - $ref: '#/components/parameters/global_x_api_version'
      responses:
        '200':
          $ref: '#/components/responses/FetchDetailsResponse'
        '400':
          $ref: '#/components/responses/400FetchDetails'
        '422':
          $ref: '#/components/responses/Response422'
        '429':
          $ref: '#/components/responses/Response429'
        '500':
          $ref: '#/components/responses/Response500V2'
      security:
        - bearerAuth: []
components:
  parameters:
    global_x_api_version:
      description: API version to be used. Format is in YYYY-MM-DD.
      name: x-api-version
      in: header
      required: true
      schema:
        type: string
        default: '2024-12-01'
        example: '2024-12-01'
      example: '2024-12-01'
  responses:
    FetchDetailsResponse:
      description: Fetch User Details from access token Response Body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/FetchDetailsResponseSchema'
          examples:
            SUCCESS:
              value:
                reference_id: 123456
                verification_id: test_verification_id
                scopes:
                  - scope: MOBILE
                    records:
                      - confidence_score: null
                        metadata:
                          mobile: '9988123456'
                  - scope: EMAIL
                    records:
                      - confidence_score: null
                        metadata:
                          email: example@example.com
                  - scope: ADDRESS
                    records:
                      - confidence_score: null
                        metadata:
                          complete_address: 123 Main St, Bangalore
                          state: KARNATAKA
                          type: Permanent
                          pincode: '123456'
                  - scope: GENDER
                    records:
                      - confidence_score: null
                        metadata:
                          gender: MALE
                  - scope: DOB
                    records:
                      - confidence_score: null
                        metadata:
                          dob: '1990-01-01'
                  - scope: AADHAAR
                    records:
                      - confidence_score: 0.85
                        metadata:
                          aadhaar: xxxxxxxx9012
                          care_of: 'S/O: Fakkirappa Dollin'
                          address: >-
                            Shri Kanaka Nilaya,,Umashankar Nagar 1st Main 5th
                            Cross,Ranebennur,Haveri-Karnataka,India
                          dob: 02-02-1995
                          email: example@example.com
                          gender: M
                          name: Mallesh Fakkirappa Dollin
                          split_address:
                            country: India
                            dist: Haveri
                            house: Shri Kanaka Nilaya
                            landmark: Shell petrol pump
                            pincode: '123456'
                            po: Ranebennur
                            state: Karnataka
                            street: Umashankar Nagar 1st Main 5th Cross
                            subdist: Ranibennur
                            vtc: Ranibennur
                          year_of_birth: '1995'
                          mobile_hash: abc123hash
                          photo_link: <base64 encoded image>
                  - scope: PAN
                    records:
                      - confidence_score: 0.85
                        metadata:
                          pan: ABCDE1234F
                          type: Individual
                          registered_name: John Doe
                          aadhaar_seeding_status: 'Y'
                          last_updated_at: '2023-09-01'
                          name_pan_card: John Doe
                          aadhaar_seeding_status_desc: Aadhaar is linked to PAN
                  - scope: BANK_ACCOUNT
                    records:
                      - confidence_score: 0.85
                        metadata:
                          bank_account: '1234567890'
                          name_at_bank: John Doe
                          bank_name: YES BANK
                          city: BANGALORE
                          branch: BANGALORE
                          micr: '123456789'
                  - scope: NAME
                    records:
                      - confidence_score: 0.85
                        metadata:
                          name: John Doe
                  - scope: OCCUPATION
                    records:
                      - confidence_score: null
                        metadata:
                          occupation: Salaried
                  - scope: INCOME
                    records:
                      - confidence_score: null
                        metadata:
                          income: BELOW_ONE_LAKH
    400FetchDetails:
      description: Validation Errors Initiate OAuth.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Access Token Missing:
              value:
                type: validation_error
                code: access_token_missing
                message: access_token is missing in the request.
            Invalid Access Token:
              value:
                type: validation_error
                code: access_token_value_invalid
                message: access_token should be valid.
    Response422:
      description: >-
        Validation error because of insufficient balance to process this
        request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Insufficient balance:
              value:
                type: validation_error
                code: insufficient_balance
                message: Insufficient balance to process this request
    Response429:
      description: Rate limit exceed error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Rate limit error per operation:
              value:
                type: rate_limit_error
                code: too_many_requests_per_operation
                message: Too many requests for this operation, rate limit reached
            Rate limit error per IP:
              value:
                type: rate_limit_error
                code: too_many_requests_per_ip
                message: Too many requests from the IP, rate limit reached
    Response500V2:
      description: Internal error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponseSchema'
          examples:
            Internal Server Error:
              value:
                type: internal_error
                code: verification_failed
                message: something went wrong
  schemas:
    FetchDetailsResponseSchema:
      type: object
      properties:
        reference_id:
          type: string
          description: A unique ID created by Cashfree Payments for reference purposes.
          example: ref123
        verification_id:
          type: string
          description: It is the unique ID you create to identify the verification request.
          example: verif123
        scopes:
          type: array
          description: >-
            A list of scopes associated with the verification, each representing
            a specific type of user data that can be accessed.
          items:
            $ref: '#/components/schemas/Scope'
    ErrorResponseSchema:
      type: object
      properties:
        code:
          type: string
          example: x-client-id_missing
        error:
          type: object
          example:
            ref_id: 102
        message:
          type: string
          example: x-client-id is missing in the request.
          description: It displays the outcome of the error.
        type:
          type: string
          example: validation_error
          description: It displays the type of error.
    Scope:
      type: object
      properties:
        scope:
          description: This describes the scope for which the user has provided consent.
          type: string
          example: MOBILE
        records:
          type: array
          items:
            anyOf:
              - $ref: '#/components/schemas/Mobile_Record'
              - $ref: '#/components/schemas/Email_Record'
              - $ref: '#/components/schemas/Address_Record'
              - $ref: '#/components/schemas/Gender_Record'
              - $ref: '#/components/schemas/DOB_Record'
              - $ref: '#/components/schemas/Aadhaar_Record'
              - $ref: '#/components/schemas/PAN_Record'
              - $ref: '#/components/schemas/BAV_Record'
              - $ref: '#/components/schemas/Name_Record'
              - $ref: '#/components/schemas/Occupation_Record'
              - $ref: '#/components/schemas/Income_Record'
    Mobile_Record:
      description: It displays the mobile number linked to the user.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the mobile
            number details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            mobile:
              type: string
              example: '9988123456'
              description: The 10-digit mobile number of the user.
    Email_Record:
      description: It displays the email address associated with the user.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the email
            address details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            email:
              type: string
              example: example@example.com
              description: The email address of the user.
    Address_Record:
      description: It displays the complete address details of the user.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the address
            details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            complete_address:
              type: string
              example: 123 Main St, Anytown
              description: The full address of the user.
            state:
              type: string
              example: State
              description: The state of the user.
            pincode:
              type: string
              example: '123456'
              description: The postal code of the user.
    Gender_Record:
      description: It displays the user's gender.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user’s
            gender details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            gender:
              type: string
              example: MALE
              description: The gender of the user.
    DOB_Record:
      description: It displays the user's date of birth.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            date of birth details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            dob:
              type: string
              example: '1990-01-01'
              description: The user's date of birth.
    Aadhaar_Record:
      description: It displays the details linked to the user's Aadhaar card.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            Aadhaar card details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            aadhaar:
              type: string
              example: '123456789012'
              description: The Aadhaar number of the user.
            care_of:
              type: string
              example: John Doe
              description: The name of the person the address is care of.
            address:
              type: string
              example: 123 Main St, Anytown
              description: The full address linked to the Aadhaar.
            dob:
              type: string
              example: '1990-01-01'
              description: Date of birth linked with Aadhaar.
            email:
              type: string
              example: example@example.com
              description: Email address linked to the Aadhaar.
            gender:
              type: string
              example: Male
              description: Gender information linked to the Aadhaar.
            name:
              type: string
              example: John Doe
              description: Name of the user linked to Aadhaar.
            split_address:
              $ref: '#/components/schemas/SplitAddressRecord'
            year_of_birth:
              type: string
              example: '1990'
              description: Year of birth associated with Aadhaar.
            mobile_hash:
              type: string
              example: abc123hash
              description: Hashed mobile number.
            photo_link:
              type: string
              example: https://example.com/photo.jpg
              description: Encoded link of the user's photo.
    PAN_Record:
      description: >-
        It displays information of the user's PAN (Permanent Account Number)
        card.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            PAN card details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            pan:
              type: string
              example: ABCPV1234D
              description: >-
                It displays the unique 10-character alphanumeric identifier
                issued by the Income Tax Department.
            type:
              type: string
              example: Individual
              description: >-
                It displays the type of the PAN issued. Possible values are
                `Individual` `Company`.
            registered_name:
              type: string
              example: John Doe
              description: It displays the PAN registered name.
            aadhaar_seeding_status:
              type: string
              example: 'Y'
              description: >-
                It displays additional information of the linking of aadhaar and
                PAN card. Possible values are:

                - `Y`: Aadhaar is linked to pan

                - `R`: Aadhaar is not linked to pan

                - `NA`: Not applicable, in case of business pan
            last_updated_at:
              type: string
              example: '2023-09-01'
              description: It displays the last updated date, formatted as `YYYY-MM-DD`.
            name_pan_card:
              type: string
              example: John Doe
              description: The name displayed on the PAN card. For example, "John Doe".
            aadhaar_seeding_status_desc:
              type: string
              example: Linked with Aadhaar
              description: >-
                It displays additional information of the linking of aadhaar and
                PAN card.
    BAV_Record:
      description: It displays the user's bank account information.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            bank account verification details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            bank_account:
              type: string
              example: '1234567890'
              description: The user's bank account number. For example, "1234567890".
            name_at_bank:
              type: string
              example: John Doe
              description: The name of the account holder as registered with the bank.
            bank_name:
              type: string
              example: Example Bank
              description: >-
                The name of the bank where the account is held. For example,
                "HDFC Bank".
            city:
              type: string
              example: Anytown
              description: >-
                The city where the bank branch is located. For example,
                "BENGALURU".
            branch:
              type: string
              example: Main Branch
              description: The specific branch of the bank where the account is maintained.
            micr:
              type: string
              example: '123456789'
              description: >-
                The Magnetic Ink Character Recognition (MICR) code for the bank
                branch, used for cheque processing.
    Name_Record:
      description: It displays the user's full name.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user name
            extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            name:
              type: string
              example: John Doe
              description: The user's full name.
    Occupation_Record:
      description: It displays the user's occupation information.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            occupation details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            occupation:
              description: The user's occupation.
              type: string
              example: Salaried
    Income_Record:
      description: It displays the user's income range.
      type: object
      properties:
        confidence_score:
          description: >-
            Indicates the system's certainty about the accuracy of the user's
            income details extracted or matched.
          type: number
          example: 0.85
        metadata:
          type: object
          properties:
            income:
              description: >-
                Represents the user's income range. Possible values are:

                `BELOW_ONE_LAKH` `ONE_TO_FIVE_LAKHS` `FIVE_TO_TEN_LAKHS`
                `ABOVE_TEN_LAKHS`.
              type: string
              example: ONE_TO_FIVE_LAKHS
    SplitAddressRecord:
      description: A detailed breakdown of the address information.
      type: object
      properties:
        country:
          type: string
          example: India
          description: Country of the user's address linked to Aadhaar.
        dist:
          type: string
          example: BANGALORE
          description: District of the user's address linked to Aadhaar.
        house:
          type: string
          example: House No 1
          description: House number of the user's address linked to Aadhaar.
        landmark:
          type: string
          example: Near Landmark
          description: Landmark of the user's address linked to Aadhaar.
        pincode:
          type: string
          example: '123456'
          description: The postal code of the user's address linked to Aadhaar.
        po:
          type: string
          example: Post Office
          description: The postal office of the user's address linked to Aadhaar.
        state:
          type: string
          example: Karnataka
          description: State of the user's address linked to Aadhaar.
        street:
          type: string
          example: Street 123
          description: Street name of the user's address linked to Aadhaar.
        subdist:
          type: string
          example: Ranibennur
          description: Sub-district of the user's address linked to Aadhaar.
        vtc:
          type: string
          example: Ranibennur
          description: Village or town of the user's address linked to Aadhaar.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````