I noticed that if I provide Products("income_verification") to LinkTokenCreateRequest, but do not specify appropriate parameters for the LinkTokenCreateRequest, like below:
user_token=<user_token>,
income_verification=LinkTokenCreateRequestIncomeVerification(
income_source_types=[IncomeVerificationSourceType("bank")],
bank_income=LinkTokenCreateRequestIncomeVerificationBankIncome(
days_requested=<days_requested>
),
),
I will get the invalid request error.
But this error is returned from Plaid API. Why not do this check at the level of the plaid-python library as well?
The possible analogy coming to my mind is the validation of the fields on the websites. Validations usually take place both on the front-end and back-end. Front-end needs to validate the data in the input field because it will be faster than sending invalid data to the back-end. In the case of the plaid-client library, it acts as the front-end. If we know that some additional attributes should be set when Products("income_verification") is listed in the products list, why not do the check?
I noticed that if I provide
Products("income_verification")toLinkTokenCreateRequest, but do not specify appropriate parameters for theLinkTokenCreateRequest, like below:I will get the invalid request error.
But this error is returned from Plaid API. Why not do this check at the level of the
plaid-pythonlibrary as well?The possible analogy coming to my mind is the validation of the fields on the websites. Validations usually take place both on the front-end and back-end. Front-end needs to validate the data in the input field because it will be faster than sending invalid data to the back-end. In the case of the
plaid-clientlibrary, it acts as the front-end. If we know that some additional attributes should be set whenProducts("income_verification")is listed in theproductslist, why not do the check?