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

# Generate link_url

> Generate a short-lived Finverse Link access_token (referred to as `link_token`) and URL (link_url) to open Finverse Link UI in a browser window. The link_token is associated with a specific Customer App (client_id) and End-User (user_id), and expires after 5 minutes (resend request to renew).

Note:`redirect_uri` must be valid and associated with the `client_id`.

**Authorization**: `customer_token`.

## Required parameters

## Optional parameters

You can use the following optional parameters to customize the behaviour of Finverse Link's UI to fit your implementation requirements.

### Automatic data refresh

Parameter: `automatic_data_refresh`

Description: Configures the "Automatic data refresh" checkbox in Finverse Link's "Enter your credentials" input screen.

Recommended value: `""` (none). This defaults to `OFF` (i.e. checkbox unchecked, user editable).

Accepted values:

### Countries

Parameter: `countries`

Description: Filters the "Select Institution" screen in the Finverse Link UI to only list institutions from the specified countries. If left empty, all institutions are listed.

Recommended value: \[ \]

Accepted values: JSON-array of 3-letter ISO-3166-1 Alpha-3 codes (e.g. `["SGP", "VNM"]`)

### History Date Limit

Parameter: `history_date_limit`

Description: sets a specific start date limit for the transaction history retrieved by Finverse from the institution. This is useful when you only need Finverse to fetch recent transactions and want to speed up data retrieval. If omitted, Finverse will fetch the full available transaction history (3-24 months depending on the institution).

Recommended Value: omit the parameter

Accepted values: ISO 8601 date string ("YYYY-MM-DD")

### Institution ID

Parameter: `institution_id`

Description: Instructs Finverse Link UI to skip the institution selection screen (after the consent screen), and instead go straight to the login screen of the specified institution.

Recommended Value: ""

Accepted values: A single institution's `institution_id` (see `GET /institutions`).

### Institution status

Parameter: `institution_status`

Description: Specifies which institutions to list in the Finverse Link UI based on their reliability status (e.g. "beta" status).

Recommended value: ""

Accepted values: space-separated list

- `beta` : show only institutions that are in "beta" status
    
- `supported` : show only institutions that are in "supported" status (default for Customer Apps in live mode)
    
- `beta supported` : show both "beta" and "supported" institutions (default for Customer Apps in test mode)
    

### Language

Parameter: `language`

Description: Specifies the desired language selection for Finverse Link.

Recommended value: "" or any valid language code (based on desired UI). If empty or if an unsupported language is specified, Finverse Link will display the default language (`en`).

Accepted values: 2-letter ISO 639-1 alpha-2 code. Supported languages:

(note: inputs are case-sensitive)

### Link mode

Parameter: `link_mode`

Description: Specifies whether to display specific sets of institutions (e.g. test institutions) in the Finverse Link UI. This can be helpful for testing purposes, for example to force-display test institutions when testing in the Finverse Prod environment.

Recommended value: "" for live apps; "test" or "real test" for test apps.

Accepted values: space-separated list

- `real` : show only real banks (default)
    
- `test` : show only test banks
    
- `real test` shows both real banks & test banks
    

### Products requested

Parameter: `products_requested`

Description: Instructs Finverse to only fetch the products specified in this field. If left empty, Finverse will fetch all data products.

Recommended value: \[ \]

Accepted values: JSON-array of strings of Finverse products (e.g. `["ACCOUNTS", "TRANSACTIONS"]`)

### Products supported

Parameter: `products_supported`

Description: Filters the "Select Institution" screen in the Finverse Link UI to only list institutions which support the specified products. If left empty, all institutions are listed.

Recommended value: \[ \]

Accepted values: JSON-array of strings of Finverse products (e.g. `["ACCOUNT_NUMBERS", "IDENTITY", "STATEMENTS"]`)

### UI mode

Parameter: `ui_mode`

Description: Specifies the behaviour of the Finverse Link UI upon completion of the linking flow (in both success or error cases). If left empty, Finverse Link will default to `iframe` behaviour for the Data institution linking UI.

Recommended values: any (based on desired UI)

Accepted values:

- `""`: defaults to `iframe` behaviour for the Data institution linking UI.
    
- `iframe`: for use when the Finverse Link UI is launched as an iframe/webview embedded within the customer's application. On success/error, the callback to the customer's `redirect_uri` is triggered in the background, and the response is silently discarded. Finverse will display an Exit ("X") button on each screen and a "Continue" button on final success/error screens, allowing the user to close the iframe/webview and return to the customer's application (requires customer's application to handle iframe/webview messages).
    
- `redirect`: for use when the Finverse Link UI is launched in a new window/webview. On success/error, the callback isn't triggered immediately, but is bound to the "Continue" and "Exit" buttons. When the user clicks either button, the UI will navigate to the customer's `redirect_uri`.
    
- `auto_redirect`: similar to `redirect` mode, for use when the Finverse Link UI is launched in a new window/webview. On success/error, the callback is automatically triggered after 1 second, and the UI navigates to the customer's `redirect_uri`.
    
- `standalone`: for use when the Finverse Link UI is launched in a new window/webview without the need to navigate back to the customer's application. On success/error, the callback to the customer's `redirect_uri` is triggered in the background, and the response is silently discarded. Finverse will display a "You may close this window now" message on final success/error screens, guiding the user to manually close the window/webview.
    

### User configs

> Beta (subject to change). 
  

Parameter: `user_configs`

Description: Object to configure additional user-level inputs for the User's authentication & data retrieval session.

Recommended value: {}

Accepted values: see below

### User type

Parameter: `user_type`

Description: Filters the "Select Institution" screen in the Finverse Link UI to only list institutions which support the specified user type (e.g. individual vs. business accounts). If left empty, all institutions are listed.

Recommended value: \[ \]

Accepted values: JSON-array of strings of Finverse user types (e.g. `["BUSINESS", "INDIVIDUAL"]`)

## Token handling

### Usage

`link_token` is intended for use by front-end clients to call Finverse API. It is the only Finverse API token that is considered non-sensitive.

### Renewal

`link_token` expires after 5 minutes.

Repeat this request for token renewal.



## OpenAPI

````yaml /api-reference/openapi.json post /link/token
openapi: 3.0.0
info:
  description: Documentation of the early finverse services
  title: Finverse Public
  termsOfService: https://example.com
  contact:
    name: Maintainers
    email: info@finverse.com
  license:
    name: unknown license
  version: 0.0.1
servers:
  - url: https://api.prod.finverse.net
security:
  - Oauth2:
      - test
tags:
  - name: public
    description: Publicly accessible endpoints
    x-group: Public
  - name: customer
    description: Customer app and institution endpoints
    x-group: Customer
  - name: link
    description: Finverse Link flows
    x-group: Link
  - name: login_identity
    description: Login identity lifecycle and metadata
    x-group: Login identity
  - name: accounts
    description: Accounts, balances, and account numbers
    x-group: Accounts
  - name: statements
    description: Statements and composite statements
    x-group: Statements
  - name: transactions
    description: Transaction history
    x-group: Transactions
  - name: identity_income
    description: Identity and income insights
    x-group: Identity & income
  - name: payment_links
    description: Payment link creation and checkout
    x-group: Payment links
  - name: mandates
    description: Direct debit mandates
    x-group: Mandates
  - name: payments
    description: Payment initiation and status
    x-group: Payment operations
  - name: payouts
    description: Payouts and scheduled payouts
    x-group: Payouts
  - name: payment_users
    description: Payment user profiles
    x-group: Payment users
  - name: payment_accounts
    description: Payment accounts for users
    x-group: Payment accounts
  - name: payment_methods
    description: Stored payment methods
    x-group: Payment methods
  - name: bills
    description: Bill presentment
    x-group: Bills
  - name: disputes
    description: Payment disputes
    x-group: Disputes
  - name: ledger
    description: Ledger and statements
    x-group: Ledger
paths:
  /link/token:
    post:
      tags:
        - link
      summary: Generate link_url
      description: >-
        Generate a short-lived Finverse Link access_token (referred to as
        `link_token`) and URL (link_url) to open Finverse Link UI in a browser
        window. The link_token is associated with a specific Customer App
        (client_id) and End-User (user_id), and expires after 5 minutes (resend
        request to renew).


        Note:`redirect_uri` must be valid and associated with the `client_id`.


        **Authorization**: `customer_token`.


        ## Required parameters


        ## Optional parameters


        You can use the following optional parameters to customize the behaviour
        of Finverse Link's UI to fit your implementation requirements.


        ### Automatic data refresh


        Parameter: `automatic_data_refresh`


        Description: Configures the "Automatic data refresh" checkbox in
        Finverse Link's "Enter your credentials" input screen.


        Recommended value: `""` (none). This defaults to `OFF` (i.e. checkbox
        unchecked, user editable).


        Accepted values:


        ### Countries


        Parameter: `countries`


        Description: Filters the "Select Institution" screen in the Finverse
        Link UI to only list institutions from the specified countries. If left
        empty, all institutions are listed.


        Recommended value: \[ \]


        Accepted values: JSON-array of 3-letter ISO-3166-1 Alpha-3 codes (e.g.
        `["SGP", "VNM"]`)


        ### History Date Limit


        Parameter: `history_date_limit`


        Description: sets a specific start date limit for the transaction
        history retrieved by Finverse from the institution. This is useful when
        you only need Finverse to fetch recent transactions and want to speed up
        data retrieval. If omitted, Finverse will fetch the full available
        transaction history (3-24 months depending on the institution).


        Recommended Value: omit the parameter


        Accepted values: ISO 8601 date string ("YYYY-MM-DD")


        ### Institution ID


        Parameter: `institution_id`


        Description: Instructs Finverse Link UI to skip the institution
        selection screen (after the consent screen), and instead go straight to
        the login screen of the specified institution.


        Recommended Value: ""


        Accepted values: A single institution's `institution_id` (see `GET
        /institutions`).


        ### Institution status


        Parameter: `institution_status`


        Description: Specifies which institutions to list in the Finverse Link
        UI based on their reliability status (e.g. "beta" status).


        Recommended value: ""


        Accepted values: space-separated list


        - `beta` : show only institutions that are in "beta" status
            
        - `supported` : show only institutions that are in "supported" status
        (default for Customer Apps in live mode)
            
        - `beta supported` : show both "beta" and "supported" institutions
        (default for Customer Apps in test mode)
            

        ### Language


        Parameter: `language`


        Description: Specifies the desired language selection for Finverse Link.


        Recommended value: "" or any valid language code (based on desired UI).
        If empty or if an unsupported language is specified, Finverse Link will
        display the default language (`en`).


        Accepted values: 2-letter ISO 639-1 alpha-2 code. Supported languages:


        (note: inputs are case-sensitive)


        ### Link mode


        Parameter: `link_mode`


        Description: Specifies whether to display specific sets of institutions
        (e.g. test institutions) in the Finverse Link UI. This can be helpful
        for testing purposes, for example to force-display test institutions
        when testing in the Finverse Prod environment.


        Recommended value: "" for live apps; "test" or "real test" for test
        apps.


        Accepted values: space-separated list


        - `real` : show only real banks (default)
            
        - `test` : show only test banks
            
        - `real test` shows both real banks & test banks
            

        ### Products requested


        Parameter: `products_requested`


        Description: Instructs Finverse to only fetch the products specified in
        this field. If left empty, Finverse will fetch all data products.


        Recommended value: \[ \]


        Accepted values: JSON-array of strings of Finverse products (e.g.
        `["ACCOUNTS", "TRANSACTIONS"]`)


        ### Products supported


        Parameter: `products_supported`


        Description: Filters the "Select Institution" screen in the Finverse
        Link UI to only list institutions which support the specified products.
        If left empty, all institutions are listed.


        Recommended value: \[ \]


        Accepted values: JSON-array of strings of Finverse products (e.g.
        `["ACCOUNT_NUMBERS", "IDENTITY", "STATEMENTS"]`)


        ### UI mode


        Parameter: `ui_mode`


        Description: Specifies the behaviour of the Finverse Link UI upon
        completion of the linking flow (in both success or error cases). If left
        empty, Finverse Link will default to `iframe` behaviour for the Data
        institution linking UI.


        Recommended values: any (based on desired UI)


        Accepted values:


        - `""`: defaults to `iframe` behaviour for the Data institution linking
        UI.
            
        - `iframe`: for use when the Finverse Link UI is launched as an
        iframe/webview embedded within the customer's application. On
        success/error, the callback to the customer's `redirect_uri` is
        triggered in the background, and the response is silently discarded.
        Finverse will display an Exit ("X") button on each screen and a
        "Continue" button on final success/error screens, allowing the user to
        close the iframe/webview and return to the customer's application
        (requires customer's application to handle iframe/webview messages).
            
        - `redirect`: for use when the Finverse Link UI is launched in a new
        window/webview. On success/error, the callback isn't triggered
        immediately, but is bound to the "Continue" and "Exit" buttons. When the
        user clicks either button, the UI will navigate to the customer's
        `redirect_uri`.
            
        - `auto_redirect`: similar to `redirect` mode, for use when the Finverse
        Link UI is launched in a new window/webview. On success/error, the
        callback is automatically triggered after 1 second, and the UI navigates
        to the customer's `redirect_uri`.
            
        - `standalone`: for use when the Finverse Link UI is launched in a new
        window/webview without the need to navigate back to the customer's
        application. On success/error, the callback to the customer's
        `redirect_uri` is triggered in the background, and the response is
        silently discarded. Finverse will display a "You may close this window
        now" message on final success/error screens, guiding the user to
        manually close the window/webview.
            

        ### User configs


        > Beta (subject to change). 
          

        Parameter: `user_configs`


        Description: Object to configure additional user-level inputs for the
        User's authentication & data retrieval session.


        Recommended value: {}


        Accepted values: see below


        ### User type


        Parameter: `user_type`


        Description: Filters the "Select Institution" screen in the Finverse
        Link UI to only list institutions which support the specified user type
        (e.g. individual vs. business accounts). If left empty, all institutions
        are listed.


        Recommended value: \[ \]


        Accepted values: JSON-array of strings of Finverse user types (e.g.
        `["BUSINESS", "INDIVIDUAL"]`)


        ## Token handling


        ### Usage


        `link_token` is intended for use by front-end clients to call Finverse
        API. It is the only Finverse API token that is considered non-sensitive.


        ### Renewal


        `link_token` expires after 5 minutes.


        Repeat this request for token renewal.
      operationId: generateLinkToken
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LinkTokenRequest'
            examples:
              generate_link_url:
                summary: Generate link_url
                value:
                  client_id: '{{client_id}}'
                  user_id: customer_user1
                  redirect_uri: '{{REDIRECT_URI}}'
                  state: '{{customer_app_id}}_stateparameter'
                  grant_type: client_credentials
                  response_mode: form_post
                  response_type: code
                  automatic_data_refresh: ''
                  countries: []
                  institution_id: ''
                  institution_status: alpha beta supported
                  language: en
                  link_mode: ''
                  products_requested: []
                  products_supported: []
                  ui_mode: ''
                  user_configs: {}
                  user_type: []
              generate_link_url_to_relink_with_login_identity_token:
                summary: Generate link_url to Relink with login_identity_token
                value:
                  client_id: '{{client_id}}'
                  redirect_uri: '{{REDIRECT_URI}}'
                  state: '{{customer_app_id}}_stateparameter'
                  grant_type: client_credentials
                  response_mode: form_post
                  response_type: code
              alternative_generate_link_url_to_relink_with_customer_token_login_identity_id:
                summary: >-
                  ALTERNATIVE: Generate link_url to Relink with customer_token +
                  login_identity_id
                value:
                  client_id: '{{client_id}}'
                  login_identity_id: '{{login_identity_id}}'
                  redirect_uri: '{{REDIRECT_URI}}'
                  state: '{{customer_app_id}}_stateparameter'
                  grant_type: client_credentials
                  response_mode: form_post
                  response_type: code
                  language: ''
                  products_requested: []
                  ui_mode: ''
        description: token request
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LinkTokenResponse'
              examples:
                success:
                  summary: Success
                  value:
                    access_token: '{link_token}'
                    expires_in: 300
                    issued_at: '2022-08-01T01:01:00.000Z'
                    link_url: >-
                      https://link.sandbox.finverse.net/onboarding?token={link_token}
                    token_type: Bearer
                success_2:
                  summary: Success
                  value:
                    access_token: >-
                      eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3dC9jcnlwdG9LZXlzL2p3dC1rZXkvY3J5cHRvS2V5VmVyc2lvbnMvMSIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2FwaS5wcm9kLmZpbnZlcnNlLm5ldCIsImF1dG9tYXRpY0RhdGFSZWZyZXNoIjoiT0ZGIiwiY2xpZW50SWQiOiIwMUpOMk01VkZHVFk3NDFZMDU1MTZLMFNYNiIsImN1c3RvbWVyQXBwSWQiOiIwMUpOMk01VkdITjUzS1NTUDdGRzlTMTVSQyIsImN1c3RvbWVyQXBwTmFtZSI6IkZpbnZlcnNlIERlbW8iLCJjdXN0b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QgcmVsaW5rQXBpOmNyZWF0ZSIsInN1YiI6IjAxSk4yTTVWRkdUWTc0MVkwNTUxNkswU1g2In0.PWvcIvcJlB4b0mOp0AL0-4i3GHXRnd_oLblsaSKFrnUnZgYg3Xe1UjBcTg-nruO8Zk6JGNKShELStru7Ylp-idG3yVcLee-_KHK3iAaS5ZyjcrMt45nQMCnkwBvv5PpvyHmyZY5mdHq9OpW-VBqHByTdjTho-4Wu0caVfU99baA2_YcmP8lSPcf-7GmwlQ-IplmF-HMvD-64pOJOSq-kcRLd1uMmpeSP0Mlp6yzx1XDGO7GJVm-RlUratImhkhHMrRNYx60Uv5NArUsjYWl58Gf22cO3QrP4tkzIf-LE8R3NLiWnmiuLetC7Q8-3qDuVYUEfwd6Kl5bdqPod61Df6EsyKy3fJKUC6PbXtATmgijcefvPmWNWtp5247URepSrseu-2KI2CFWa7IoMgS84wvG0syfVbP8aQ1up_bgt-vU8V5Z2RfNHgCfwHD7ZBha_RMErWxT86twgF7nNk330fjRcWplv0hzy3zz3jwsGQyBtFkxf7PdX0CBO075YjYPXUbWEbV8RAdjkY-ZwYMJk9eu9nh0Cy3j3ksrN7pkBgA63he7HVvWfkYihwhVl9HYN_SOe8HEa8klGnHvRfEs0sVFSesUgKPCrhZWy48_nagkOf1Kv_ed34y1lf2R2KBd4cuGCFf3RlT47pqtR9sVUnI62AXFgRHm9UftK2Q4U_9A
                    expires_in: 300
                    issued_at: '2025-09-19T05:24:35.000Z'
                    link_url: >-
                      https://link.prod.finverse.net/onboarding/login/testbank?infoMessage=Use+credentials%3A+User+ID+%3D+usergood+%7C+Password+%3D+datagood&refresh=true&token=eyJhbGciOiJSUzI1NiIsImtpZCI6Imp3dC9jcnlwdG9LZXlzL2p3dC1rZXkvY3J5cHRvS2V5VmVyc2lvbnMvMSIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJodHRwczovL2FwaS5wcm9kLmZpbnZlcnNlLm5ldCIsImF1dG9tYXRpY0RhdGFSZWZyZXNoIjoiT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xvcGVyLnByb2QuZmludmVyc2UubmV0L3NpbmsiLCJzY29wZSI6ImN1c3RvbWl6YXRpb246Z2V0IGluc3RpdHV0aW9uIGluc3RpdHV0aW9uOmxpbmsgbGlua0FwaTpjcmVhdGUgbGlua0FwaTp1cGRhdGUgZnZMaW5rU3RhdHVzOnJlYWQgcmVsaW5rQXBpOmNyZWF0ZSIsInN1YiI6IjAxSk4yTTVWRkdUWTc0MVkwNTUxNkswU1g2In0.PWvcIvcJlB4b0mOp0AL0-4i3GHXRnd_oLblsaSKFrnUnZgYg3Xe1UjBcTg-nruO8Zk6JGNKShELStru7Ylp-idG3yVcLee-_KHK3iAaS5ZyjcrMt45nQMCnkwBvv5PpvyHmyZY5mdHq9OpW-VBqHByTdjTho-4Wu0caVfU99baA2_YcmP8lSPcf-7GmwlQ-IplmF-HMvD-64pOJOSq-kcRLd1uMmpeSP0Mlp6yzx1XDGO7GJVm-RlUratImhkhHMrRNYx60Uv5NArUsjYWl58Gf22cO3QrP4tkzIf-LE8R3NLiWnmiuLetC7Q8-3qDuVYUEfwd6Kl5bdqPod61Df6EsyKy3fJKUC6PbXtATmgijcefvPmWNWtp5247URepSrseu-2KI2CFWa7IoMgS84wvG0syfVbP8aQ1up_bgt-vU8V5Z2RfNHgCfwHD7ZBha_RMErWxT86twgF7nNk330fjRcWplv0hzy3zz3jwsGQyBtFkxf7PdX0CBO075YjYPXUbWEbV8RAdjkY-ZwYMJk9eu9nh0Cy3j3ksrN7pkBgA63he7HVvWfkYihwhVl9HYN_SOe8HEa8klGnHvRfEs0sVFSesUgKPCrhZWy48_nagkOf1Kv_ed34y1lf2R2KBd4cuGCFf3RlT47pqtR9sVUnI62AXFgRHm9UftK2Q4U_9A&ui_mode=iframe
                    token_type: Bearer
                success_3:
                  summary: Success
                  value:
                    access_token: '{link_token}'
                    expires_in: 300
                    issued_at: '2024-09-16T01:33:59.000Z'
                    link_url: >-
                      https://link.prod.finverse.net/onboarding/login/testbank?infoMessage=Use+credentials%3A+User+ID+%3D+usergood+%7C+Password+%3D+datagood&refresh=true&token={link_token}&ui_mode=iframe
                    token_type: Bearer
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestModelV2'
              examples:
                invalid_parameter_value_e_g_invalid_redirect_uri:
                  summary: Error (invalid parameter value, e.g. invalid redirect_uri)
                  value:
                    error:
                      code: 40006
                      details: Invalid redirect_uri value. Verify your redirect_uri
                      error_code: INVALID_INPUT
                      message: >-
                        Invalid parameter value(s). Please review parameter
                        inputs.
                      request_id: '{unique_id}'
                      type: API_ERROR
                missing_login_identity_id:
                  summary: Error (missing Login Identity ID)
                  value:
                    error:
                      code: 40003
                      details: The user_id should be provided.
                      error_code: INVALID_PARAMETER
                      message: The parameters provided are invalid. See details.
                      request_id: '1758259626'
                      type: API_ERROR
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestModelV2'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestModelV2'
              examples:
                invalid_login_identity_id:
                  summary: Error (invalid Login Identity ID)
                  value:
                    error:
                      code: 50001
                      error_code: INTERNAL_SERVER_ERROR
                      message: >-
                        We encountered an unexpected error. Please contact
                        customer support for further assistance.
                      request_id: '1758259592'
                      type: API_ERROR
      security:
        - Oauth2:
            - link:token
components:
  schemas:
    LinkTokenRequest:
      required:
        - grant_type
        - response_type
        - response_mode
        - redirect_uri
        - client_id
      properties:
        automatic_data_refresh:
          description: Controls the behavior of the automatic data refresh checkbox
          type: string
          maxLength: 100
          enum:
            - 'ON'
            - 'OFF'
            - FORCED_ON
        client_id:
          type: string
          maxLength: 100
          minLength: 4
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
          description: >-
            Assigned by Finverse when setting up API credentials in Finverse's
            customer dashboard (dashboard.finverse.com)
        code_challenge:
          type: string
          maxLength: 100
          example: code-challenge
        code_challenge_method:
          type: string
          maxLength: 100
          example: code-challenge-method
        countries:
          description: institution's country filter
          type: array
          items:
            type: string
            maxLength: 3
          example:
            - HKG
            - SGP
        customization_id:
          description: >-
            The customization id if the customer wishes to embed it into link
            token for spawning link with their choice of stuffs
          type: string
          maxLength: 100
          example: AULIDGOESHERE
        grant_type:
          description: 'Always equal to: `client_credentials`'
          type: string
          maxLength: 100
        history_date_limit:
          description: >-
            Limit historical data retrieval to this date. ISO format
            (YYYY-MM-DD)
          type: string
          format: date
          example: '2024-01-31'
        institution_id:
          description: Institution to preselect
          type: string
          maxLength: 100
          example: hsbc-hk
        institution_status:
          description: institution's status filter
          type: string
          maxLength: 100
          example: alpha beta supported
        language:
          description: >-
            ISO639-1 language code. Language to display when user open the link,
            default to English (en) if not specified
          type: string
          maxLength: 3
          enum:
            - en
            - vi
            - zh
            - ko
          example: en
        link_mode:
          description: Space separated list of the tags of the institutions to view.
          type: string
          maxLength: 100
          example: real
        login_identity_id:
          description: use this to update a specific login identity
          type: string
          maxLength: 100
          example: uhdasidasodaso
        payment_instruction_id:
          description: The identifier returned after creating payment instruction
          type: string
          maxLength: 100
          example: payment_instruction_id
        products_requested:
          description: products that is requested
          type: array
          items:
            type: string
            maxLength: 100
          example:
            - ACCOUNTS
            - TRANSACTIONS
            - PAYMENTS
        products_supported:
          description: institution's supported product filter
          type: array
          items:
            type: string
            maxLength: 100
          example:
            - ACCOUNTS
            - TRANSACTIONS
        redirect_uri:
          type: string
          maxLength: 500
          minLength: 4
          example: https://example.com/callback
          description: >-
            Finverse Link UI will redirect to this uri after either success or
            failure
        response_mode:
          type: string
          maxLength: 100
          example: form_post
          description: 'Always equal to: `form_post`'
        response_type:
          type: string
          maxLength: 100
          example: code
          description: 'Always equal to: `code`'
        scope:
          type: string
          maxLength: 500
          example: comma,separated,scopes
        state:
          type: string
          maxLength: 100
          example: user-state-passed
          description: >-
            Customer-supplied state (treated as an opaque value), used by
            customer to uniquely identify the linking session
        ui_mode:
          description: >-
            The UI mode link is intended to be used in - "iframe",
            "auto_redirect", "redirect" or "standalone"
          type: string
          enum:
            - iframe
            - redirect
            - auto_redirect
            - standalone
          example: redirect
        user_configs:
          $ref: '#/components/schemas/LinkTokenUserConfigs'
        user_id:
          description: Customer-supplied ID, used by customer to uniquely identify the user
          type: string
          maxLength: 100
          minLength: 4
          example: 01BX5ZZKBKACTAV9WEVGEMMVRY
        user_type:
          description: institution's supported user_type filter
          type: array
          items:
            type: string
            maxLength: 100
          example:
            - PERSONAL
    LinkTokenResponse:
      required:
        - access_token
        - token_type
        - expires_in
        - link_url
        - issued_at
      properties:
        access_token:
          type: string
          description: Link session token (referred to as `link_token`)
        expires_in:
          description: Token validity length (in seconds)
          type: integer
          format: int64
        issued_at:
          type: string
          format: date-time
          description: Token issue time
        link_url:
          type: string
          example: https://link.dev.finverse.net/onboarding?token=dasdsa8erhiu7rey78r
          description: >-
            URL to launch the Finverse Link UI flow associated with this
            `link_token`, for the end-user to provide required consent and
            linking inputs.
        token_type:
          type: string
          description: 'Possible values: `Bearer`'
    BadRequestModelV2:
      properties:
        error:
          type: object
          required:
            - type
            - code
            - error_code
            - message
            - request_id
          properties:
            code:
              type: integer
              example: 40004
            details:
              type: string
            error_code:
              type: string
              example: CREDENTIALS_INVALID
            message:
              type: string
            request_id:
              description: The request_id provided in the request header
              type: string
            type:
              description: The error type
              type: string
              enum:
                - LINK_ERROR
                - API_ERROR
              example: LINKING_ERROR
    LinkTokenUserConfigs:
      properties:
        ada_account_number:
          description: >-
            User's account number for which an auto debit authorization should
            be setup. This value should exactly match the account number used by
            the bank (without symbols, but including any leading `0`s). Note:
            only applies to linking sessions where Finverse sets up an
            auto-debit / direct debit authorization (i.e. where institution's
            `products_supported` = `AUTO_DEBIT_SETUP`).
          type: string
  securitySchemes:
    Oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://finverse-dev.us.auth0.com/oauth/token
          scopes:
            account: Account
            balance: Balance
            credit: Credit
            institution: Institution
            investment: Investment
            link: Link
            test: Test
            transaction: Transaction

````