Code Monkey home page Code Monkey logo

quickstart's Introduction

Plaid quickstart

This repository accompanies Plaid's quickstart guide.

Here you'll find full example integration apps using our client libraries.

This Quickstart is designed to show as many products and configurations as possible, including all five officially supported backends and multiple Plaid APIs, against a React frontend.

If you prefer a non-React frontend platform, or a more minimal backend in one language with one endpoint, see the Tiny Quickstart, which shows a simpler backend and is available for JavaScript, Next.js, React, and React Native frontends.

For Identity Verification, see the Identity Verification Quickstart.

For Income, see the Income sample app.

Plaid quickstart app

Table of contents

1. Clone the repository

Using https:

git clone https://github.com/plaid/quickstart
cd quickstart

Alternatively, if you use ssh:

git clone [email protected]:plaid/quickstart.git
cd quickstart

Special instructions for Windows

Note - because this repository makes use of symbolic links, to run this on a Windows machine, make sure you have checked the "enable symbolic links" box when you download Git to your local machine. Then you can run the above commands to clone the quickstart. Otherwise, you may open your Git Bash terminal as an administrator and use the following command when cloning the project

git clone -c core.symlinks=true https://github.com/plaid/quickstart

2. Set up your environment variables

cp .env.example .env

Copy .env.example to a new file called .env and fill out the environment variables inside. At minimum PLAID_CLIENT_ID and PLAID_SECRET must be filled out. Get your Client ID and secrets from the dashboard: https://dashboard.plaid.com/developers/keys

NOTE: .env files are a convenient local development tool. Never run a production application using an environment file with secrets in it.

3. Run the Quickstart

There are two ways to run the various language quickstarts in this repository. You can choose to run the code directly or you can run it in Docker. If you would like to run the code via Docker, skip to the Run with Docker section.

Run without Docker

Pre-requisites

  • The language you intend to use is installed on your machine and available at your command line. This repo should generally work with active LTS versions of each language such as node >= 14, python >= 3.8, ruby >= 2.6, etc.
  • Your environment variables populated in .env
  • npm
  • If using Windows, a command line utility capable of running basic Unix shell commands

1. Running the backend

Once started with one of the commands below, the quickstart will be running on http://localhost:8000 for the backend. Enter the additional commands in step 2 to run the frontend which will run on http://localhost:3000.

Node
$ cd ./node
$ npm install
$ ./start.sh
Python

⚠️ As python2 has reached its end of life, only python3 is supported.

cd ./python

# If you use virtualenv
# virtualenv venv
# source venv/bin/activate

pip3 install -r requirements.txt
./start.sh

If you get this error message:

ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)

You may need to run the following command in your terminal for your particular version of python in order to install SSL certificates:

# examples:
open /Applications/Python\ 3.9/Install\ Certificates.command
# or
open /Applications/Python\ 3.6/Install\ Certificates.command
Ruby
cd ./ruby
bundle
./start.sh
Go
cd ./go
go build
./start.sh
Java
cd ./java
mvn clean package
./start.sh
.NET

A community-supported implementation of the Plaid Quickstart using the Going.Plaid client library can be found at PlaidQuickstartBlazor. Note that Plaid does not provide first-party support for .NET client libraries and that this Quickstart and client library are not created, reviewed, or supported by Plaid.

2. Running the frontend

$ cd ./frontend
$ npm ci
$ npm start

Run with Docker

Pre-requisites

  • make available at your command line
  • Docker installed and running on your machine: https://docs.docker.com/get-docker/
  • Your environment variables populated in .env
  • If using Windows, a working Linux installation on Windows 10. If you are using Windows and do not already have WSL or Cygwin configured, we recommend running without Docker.

Running

There are three basic make commands available

  • up: builds and starts the container
  • logs: tails logs
  • stop: stops the container

Each of these should be used with a language argument, which is one of node, python, ruby, java, or go. If unspecified, the default is node.

Start the container
make up language=node

The quickstart backend is now running on http://localhost:8000 and frontend on http://localhost:3000.

If you make changes to one of the server files such as index.js, server.go, etc, or to the .env file, simply run make up language=node again to rebuild and restart the container.

If you experience a Docker connection error when running the command above, try the following:

  • Make sure Docker is running
  • Try running the command prefixed with sudo
View the logs
make logs language=node
Stop the container
make stop language=node

Test credentials

In Sandbox, you can log in to any supported institution (except Capital One) using user_good as the username and pass_good as the password. If prompted to enter a 2-factor authentication code, enter 1234.

In Development or Production, use real-life credentials.

Troubleshooting

Can't get a link token, or API calls are 400ing

View the server logs to see the associated error message with detailed troubleshooting instructions. If you can't view logs locally, view them via the Dashboard activity logs.

Works only when PLAID_REDIRECT_URI is not specified

Make sure to add the redirect URI to the Allowed Redirect URIs list in the Plaid Dashboard.

"Connectivity not supported"

If you get a "Connectivity not supported" error after selecting a financial institution in Link, you probably specified some products in your .env file that the target financial institution doesn't support. Remove the unsupported products and try again.

"You need to update your app" or "institution not supported"

If you get a "You need to update your app" or "institution not supported" error after selecting a financial institution in Link, you're probably running the Quickstart in Development (or Production) and attempting to link an institution, such as Chase or Wells Fargo, that requires an OAuth-based connection. In order to make OAuth connections to US-based institutions in Development or Production, you must have Production access approval, and certain institutions may also require additional approvals before you can be enabled. To use this institution, apply for Production access and see the OAuth insitutions page for any other required steps and to track your OAuth enablement status.

"oauth uri does not contain a valid oauth_state_id query parameter"

If you get the console error "oauth uri does not contain a valid oauth_state_id query parameter", you are attempting to initialize Link with a redirect uri when it is not necessary to do so. The receivedRedirectUri should not be set when initializing Link for the first time. It is used when initializing Link for the second time, after returning from the OAuth redirect.

Testing OAuth

Some institutions require an OAuth redirect authentication flow, where the end user is redirected to the bank’s website or mobile app to authenticate.

To test the OAuth flow in Sandbox, select any institution that uses an OAuth connection with Plaid (a partial list can be found on the Dashboard OAuth Institutions page), or choose 'Platypus OAuth Bank' from the list of financial institutions in Plaid Link.

Testing OAuth with a redirect URI (optional)

To test the OAuth flow in Sandbox with a redirect URI, you should set PLAID_REDIRECT_URI=http://localhost:3000/ in .env. You will also need to register this localhost redirect URI in the Plaid dashboard under Developers > API > Allowed redirect URIs. It is not required to configure a redirect URI in the .env file to use OAuth with the Quickstart.

Instructions for using https with localhost

If you want to test OAuth in development with a redirect URI, you need to use https and set PLAID_REDIRECT_URI=https://localhost:3000/ in .env. In order to run your localhost on https, you will need to create a self-signed certificate and add it to the frontend root folder. You can use the following instructions to do this. Note that self-signed certificates should be used for testing purposes only, never for actual deployments.

In your terminal, change to the frontend folder:

cd frontend

Use homebrew to install mkcert:

brew install mkcert

Then create your certificate for localhost:

mkcert -install
mkcert localhost

This will create a certificate file localhost.pem and a key file localhost-key.pem inside your client folder.

Then in the package.json file in the frontend folder, replace this line on line 28

"start": "react-scripts start",

with this line instead:

"start": "HTTPS=true SSL_CRT_FILE=localhost.pem SSL_KEY_FILE=localhost-key.pem react-scripts start",

After starting up the Quickstart, you can now view it at https://localhost:3000. If you are on Windows, you may still get an invalid certificate warning on your browser. If so, click on "advanced" and proceed. Also on Windows, the frontend may still try to load http://localhost:3000 and you may have to access https://localhost:3000 manually.

quickstart's People

Contributors

afh avatar agarciamarra avatar amytang0 avatar blackchestnut avatar cryizzle avatar davidzhanghp avatar deeechun avatar dependabot[bot] avatar flaggigbo avatar jncraton avatar lindawoo-plaid avatar michaelckelly avatar nephlm avatar notthefakestephen avatar nsundin avatar otherchen avatar pbernasconi avatar phoenixy1 avatar pixeleate avatar ravron avatar raxod502-plaid avatar rayraycano avatar ryandbump avatar stephenjayakar avatar stephenkoller avatar toddkerpelman avatar yedell avatar yingw787 avatar zachcutberth avatar zevaverbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

quickstart's Issues

403 trying to access any account?

Hi There,

I followed the quickstart guide for Python & Node, and when I try and run the local server and log into any of my accounts, I'm getting a 403 on the underlying request.

Am I naive, or should I be able to simple use my existing BofA login, for instance, and be able to successfully log in?

screenshot 2017-08-02 21 47 09

screenshot 2017-08-02 21 50 28

I should mention I'm using sandbox, would that have an effect?

country_codes must be a non-empty string array

I continue to get the following error:

Error Code: INVALID_FIELD
Error Type: INVALID_REQUEST
Error Message: country_codes must be a non-empty string array

.env

APP_PORT=8000
PLAID_CLIENT_ID='xxx'
PLAID_SECRET='xxx'
PLAID_PRODUCTS='transactions'
PLAID_COUNTRY_CODES='US'
PLAID_ENV='sandbox'

Does anyone else have this issue, if so were you able to fix it?

Edit: Had to wrap all country_codes: PLAID_COUNTRY_CODES with [] to look like country_codes: [PLAID_COUNTRY_CODES]

Request Error in python docker quickstart

I'm running Big Sur v. 11.2.1 and am trying to use docker to launch the quickstart sandbox. I get an error when navigating to localhost:3000 in my browser. The make logs are saying my frontend can't proxy from the backend:

>>> make logs              
docker-compose \
                logs --follow \
                node frontend
Attaching to quickstart_frontend_1
frontend_1  | 
frontend_1  | > [email protected] start /app
frontend_1  | > react-scripts start
frontend_1  | 
frontend_1  | [HPM] Proxy created: /  ->  http://python:8000
frontend_1  | ℹ 「wds」: Project is running at http://172.18.0.2/
frontend_1  | ℹ 「wds」: webpack output is served from 
frontend_1  | ℹ 「wds」: Content not from webpack is served from /app/public
frontend_1  | ℹ 「wds」: 404s will fallback to /
frontend_1  | Starting the development server...
frontend_1  | 
frontend_1  | Compiled with warnings.
frontend_1  | 
frontend_1  | src/App.tsx
frontend_1  |   Line 39:6:  React Hook useEffect has missing dependencies: 'dispatch' and 'generateToken'. Either include them or remove the dependency array  react-hooks/exhaustive-deps
frontend_1  | 
frontend_1  | src/Components/Link/index.tsx
frontend_1  |   Line 44:6:  React Hook React.useCallback has a missing dependency: 'dispatch'. Either include it or remove the dependency array  react-hooks/exhaustive-deps
frontend_1  | 
frontend_1  | src/Context/index.tsx
frontend_1  |   Line 45:9:  Unreachable code  no-unreachable
frontend_1  | 
frontend_1  | Search for the keywords to learn more about each warning.
frontend_1  | To ignore, add // eslint-disable-next-line to the line before.
frontend_1  | 
frontend_1  | Proxy error: Could not proxy request /favicon.ico from localhost:3000 to http://localhost:8000.
frontend_1  | See https://nodejs.org/api/errors.html#errors_common_system_errors for more information (ECONNREFUSED).
frontend_1  | 

I thought maybe my .env file was wrong, here is the .env file:

# Get your Plaid API keys from the dashboard: https://dashboard.plaid.com/account/keys
PLAID_CLIENT_ID=user_good
PLAID_SECRET=pass_good
# Use 'sandbox' to test with fake credentials in Plaid's Sandbox environment
# Use 'development' to test with real credentials while developing
# Use 'production' to go live with real users
PLAID_ENV=sandbox
# PLAID_PRODUCTS is a comma-separated list of products to use when
# initializing Link, e.g. PLAID_PRODUCTS=auth,transactions.
# see https://plaid.com/docs/api/tokens/#link-token-create-request-products for a complete list
PLAID_PRODUCTS=transactions
# PLAID_COUNTRY_CODES is a comma-separated list of countries to use when
# initializing Link, e.g. PLAID_COUNTRY_CODES=US,CA.
# see https://plaid.com/docs/api/tokens/#link-token-create-request-country-codes for a complete list
PLAID_COUNTRY_CODES=US,CA
# Only required for OAuth:
# Set PLAID_REDIRECT_URI to 'http://localhost:3000'
# The OAuth redirect flow requires an endpoint on the developer's website
# that the bank website should redirect to. You will need to configure
# this redirect URI for your client ID through the Plaid developer dashboard
# at https://dashboard.plaid.com/team/api.
PLAID_REDIRECT_URI='http://localhost:3000'

Thanks for any help!

Custom User Configuration JSON

In the Plaid Docs, we have a custom user configuration

{
  "override_accounts": [
    {
      "type": "depository",
      "subtype": "checking",
      "transactions": [
        {
          "date_transacted": "2019-10-01",
          "date_posted": "2019-10-03",
          "currency": "USD",
          "amount": 100,
          "description": "1 year Netflix subscription"
        },
        {
          "date_transacted": "2019-10-01",
          "date_posted": "2019-10-02",
          "currency": "USD",
          "amount": 100,
          "description": "1 year mobile subscription"
        }
      ]
    }
  ]
}

Can you provide an exhaustive JSON while can support all the products?

My Products config PLAID_PRODUCTS=transactions,auth,identity,assets,liabilities,investments.

Error:

Screenshot from 2020-12-16 13-08-01

The error does not show up if we just keep PLAID_PRODUCTS as transactions,auth,identity

HTTP 403 when searching for institutions

When I try to search for my bank (Capital One 360) using the institution selector, a spinner briefly appears after I type a few letters, and then I get the following message: Your search request timed-out, please try again with a better connection

Looking in the inspector, I see that a GET request to https://cdn.plaid.com/institutions/all/search?q=cap returns an HTTP 403 status. Opening that URL in a new tab gives the familiar AWS access denied error page.

The steps to getting this running seem pretty straightforward, so I don't see much room for user error here.

python e not defined

Line return jsonify({'error': {'display_message': 'Timed out when polling for Asset Report', 'error_code': e.code, 'error_type': e.type } })

"e" is not defined at this level.

Python quickstart example fails

The Python quickstart example JS code fails with:

Uncaught Error: Missing Link parameter. Link requires a key or token to be provided.

node env variable 'No environment variable named "PLAID_CLIENT_ID"'

Been a pain getting this initial walk through app working using node .

[Error [UnsetVariableError]: No environment variable named "PLAID_CLIENT_ID"] {
message: 'No environment variable named "PLAID_CLIENT_ID"'

Solution:
Will be good to include dotenv module to externalise the properties , So they can be read from .env file.
https://www.npmjs.com/package/dotenv

add following line in file index.js

require('dotenv').config();

create .env file in node root dir with following lines:
APP_PORT=8000
PLAID_CLIENT_ID=
PLAID_SECRET=xx
PLAID_PUBLIC_KEY=xx
PLAID_PRODUCTS=transactions
PLAID_COUNTRY_CODES=US,CA,GB,FR,ES,IE
PLAID_ENV=sandbox

Missing products causes quickstart failure

If following the Ruby instructions at https://dashboard.plaid.com/overview/sandbox, the institution search will fail to populate with any banks. Inspecting the javascript console will warn you that a valid list of products must be set.

The documentation neglects to mention the ENV['PLAID_PRODUCTS'] variable that is used on line 195 of views/index.erb and causes this error if it is not set. Once this is set, the institution search works fine. Since the purpose of this repo is to quickly build a templated Plaid application, this should be either hard-coded into index.erb or mentioned in the documentation near "Running the walkthrough application".

I used ["auth", "transactions", "income", "identity", "assets"], which is all of the products it accepts as valid.

Quickstart doesn't serve correct html file

When doing the quick start in either python or node, going to localhost:8000 just gives the text "../../html/index.html". Shouldn't it serve the file from that location rather than the path name text?

Python quickstart doesn't run on Python3 out of the box.

Decided to pick up plaid to play with it, and when installing on Python3 it fails due to wsgiref (there is a print statement in its setup.py), and after deleting that dependency, server.py also contains print statements.

The fix seems relatively straightforward of changing the calls in server.py to print function calls and conditionally installing wsgiref depending on if the target Python install is 2 or 3.

Happy to submit a PR to address this.

NPM audit reveals dependency vulnerabilities

Pulled the quickstart repo to test out the Node walkthrough app.

After running npm install, I'm seeing some vulnerabilities in the express package highlighted by npm's audit tool.

image

Error 411

I tried logging in my credentials to TJX Rewards and the error was:

INSTITUTION_NOT_RESPONDING 400 The financial institution is failing to respond to some of our requests. Your user may be successful if they retry another time.

However, I saw a 411 when viewing the response:

Content-Length: 411

Bank Login Keyboard Collapses on iPhones starting ~ 12PM PST October 4th 2020

Hi, I've been running the Plaid-Quickstart example in a Flutter WebView successfully for the past couple weeks, including last Sunday morning. Starting Sunday noon however, we noticed that the Keyboard for the Bank Login Screen does NOT stay up, and collapses when trying to click on either username or password fields. No changes to our code was made, and rolling back to older app builds does not remedy.

Were there any Sunday updates to the Plaid System that may have caused this?

golang quickstart app appears to have some copypasta

The ruby Quickstart app has two endpoints /get_acess_token (which takes a form field public_token) and /set_access_token (which takes a form field access_token). It calls them each under different circumstances in the template view.

The golang has only an endpoint /set_acess_token, which is defined in a function called getAccessToken, and which only references the public_token form field, not the access_token one. However, the golang template view calls set_access_token with an access_token field, which will always be ignored and the request will always fail because the public_token field is empty. It seems like this logic may have been copied over from the ruby one, changed a bit, and not properly resolved? I'd be happy to sort through it and submit a fix, but I just want to make sure that this is actually a mistake and not something I'm just misunderstanding.

The relevant code from the golang server is here, and it's added to the Gin router here. The JS logic that appears to be misusing this endpoint is here.

OAuth flow does not work on Development environment

Problem

I wanted to use Node.js Quickstart to try to get data from a real bank account. I used Plaid Development environment for that.

The Quickstart fails with bad request, because redirect_uri must use HTTPS. Apparently the redirect URL http://localhost:8000/oauth-response.html works only in Sandbox environment, and Development and Production require HTTPS.

Expected behavior

  • This limitation should be documented. I found no mention of that.
  • The Quickstart could include steps for hosting on HTTPS.

Workaround

To serve the Quickstart on self-signed HTTPS on localhost:

  1. Generate a self-signed certificate, e.g. in Bash:
openssl req -nodes -new -x509 -keyout server.key -out server.cert
  1. Add additional modules to index.js and load the generated cert:
var fs = require('fs');
var https = require('https');
var key = fs.readFileSync('server.key');
var cert = fs.readFileSync('server.cert');
  1. Replace the server creation with:
var server =
  https.createServer({
    key,
    cert
  }, app)
  .listen(APP_PORT, function() {
  console.log('plaid-quickstart server listening on port ' + APP_PORT);
});
  1. Change your URLs to HTTPS in:
  • oauth-response.html
  • index.html (at the begining of render_page function)
  • Env variable
  • Plaid account configuration

link-initialize.js:1 Uncaught Error: Missing Link parameter. Link requires a key or token to be provided.

Trying to run the python quickstart. Currently I have the following in server.py

PLAID_CLIENT_ID = '123XXXXXXXX123'
PLAID_SECRET = '321XXXXX321'
PLAID_ENV = 'sandbox'
PLAID_PRODUCTS = ['transactions']
PLAID_COUNTRY_CODES = ['US']

When I run server.py & check in the browser the Connect with Plaid button can't be selected & the list of banks never populate - it just seems to be repeatedly loading...

When I check index.html using dev tools I get the message "Uncaught Error: Missing Link parameter. Link requires a key or token to be provided." (see screenshot below).

Screenshot_2020-08-06_00-53-10

Has anyone experienced this issue or know why it occurs? As best I can tell I've followed the quickstart instructions by entering client_id, secret & other variables...

Ruby quickstart bad request

When doing the default ruby quickstart walk through, the app breaks with the following ouput

POST https://sandbox.plaid.com/link/client/get 400 (Bad Request)
Error: Error retrieving info for public key. Make sure that the entered key is correct. Find your public key in your Dashboard (https://dashboard.plaid.com/account/keys).

The public keys are right—any ideas as to why that POST endpoint would be a bad request?

The Python example here stops working when you change the PLAIN_ENV to development

Request URL: https://development.plaid.com/link/client/get
Request Method: POST
Status Code: 400 Bad Request
Remote Address: x.x.x.x:443
Referrer Policy: no-referrer-when-downgrade
Access-Control-Allow-Origin: https://cdn.plaid.com
Connection: keep-alive
Content-Length: 173
Content-Type: application/json
Date: Sun, 20 May 2018 05:34:25 GMT
Server: nginx
Vary: Origin
Accept: /
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9
Connection: keep-alive
Content-Length: 132
Content-Type: application/json
DNT: 1
Host: development.plaid.com
Origin: https://cdn.plaid.com
Plaid-Link-Version: 2.0.127
Referer: https://cdn.plaid.com/link/2.0.127/link.html?apiVersion=v2&clientName=Plaid%20Walkthrough%20Demo&customizations&env=development&experiments=%5B%5D&forceIframe=true&isMobile=false&isParentInlineStylesheetSupported=true&isParentMetaViewportSet=true&isSimpleIntegration=false&isUsingOnEventCallback=false&isUsingOnExitCallback=false&isUsingOnLoadCallback=false&key=xxxx&logInternalAnalytics=false&origin=http%3A%2F%2F127.0.0.1%3A5000&parentMetaViewport=width%3Ddevice-width%2C%20initial-scale%3D1&product=transactions&selectAccount=false&uniqueId=1&version=2.0.127
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36
{link_persistent_id: "7c59116b-d19a-4a71-b40f-106c2025a357", link_version: "2.0.127",…}
link_persistent_id
:
"7c59116b-d19a-4a71-b40f-106c2025a357"
link_version
:
"2.0.127"
public_key
:
"xxxx"

Search api fails to load the list of institutions :
Request URL: https://cdn.plaid.com/institutions/search
Request Method: POST
Status Code: 403 Forbidden
Remote Address: 52.84.235.13:443
Referrer Policy: no-referrer-when-downgrade

Node quickstart: "clientApp" is not a valid option for plaid.Client

Hey friends,

Setting up the Plaid client using Typescript 3.8.3, and using [email protected]. I've been following the Quickstart guide for node, and it sets up the plaid client with a clientApp setting:

{version: '2019-05-29', clientApp: 'Plaid Quickstart'}

When attempting to do the same, Typescript helpfully informs me that clientApp is not a a property of the ClientOptions type.

image

Is this a valid option, or is it just missing from the types?

Cheers!
Sean

iOS - "Continue" button title on link page shows "<#Continue#>" when pressed

This is related to iOS but I did not find the issue section there so I am writing details in this forum. I have integrated Plaid (version 1.1.28) from Cocoapods and facing this issue. I have checked on both iOS 12 and iOS 13 devices. I have verified the code in my app with the sample app and its exactly the same. I am sharing the screenshot of the button title when pressed.

IMG_4735

Transaction Listing through the Command Line

Is there a way to bypass the web portal to list transactions through the CLI? Looking to automate this option without having to manually click the button. I'm using the python instance.

Can't start python quickstart: TypeError: __init__() takes at least 5 arguments (5 given)

Possibly I am doing something wrong, but the python quickstart is not working for me. I freshly cloned it and then tried the following:

~/quickstart/python$ pip install -r requirements.txt
Ignoring wsgiref: markers 'python_version < "3.2"' don't match your environment
Requirement already satisfied: Flask>=0.12.3 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 1)) (1.1.2)
Requirement already satisfied: Jinja2>=2.9.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 2)) (2.11.2)
Requirement already satisfied: MarkupSafe==0.23 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 3)) (0.23)
Requirement already satisfied: Werkzeug>=0.14 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 4)) (1.0.1)
Requirement already satisfied: click==6.7 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 5)) (6.7)
Requirement already satisfied: itsdangerous==0.24 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 6)) (0.24)
Requirement already satisfied: requests==2.20.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 7)) (2.20.0)
Requirement already satisfied: plaid-python<6.0.0,>=5.0.0 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from -r requirements.txt (line 9)) (5.0.0)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests==2.20.0->-r requirements.txt (line 7)) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests==2.20.0->-r requirements.txt (line 7)) (2019.11.28)
Requirement already satisfied: idna<2.8,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests==2.20.0->-r requirements.txt (line 7)) (2.7)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages (from requests==2.20.0->-r requirements.txt (line 7)) (3.0.4)
WARNING: You are using pip version 20.1.1; however, version 20.2.4 is available.
You should consider upgrading via the '/Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -m pip install --upgrade pip' command.
~/quickstart/python$ PLAID_CLIENT_ID='CENSORED' PLAID_SECRET='CENSORED' PLAID_ENV='sandbox' PLAID_PRODUCTS='auth,transactions' python server.py
Traceback (most recent call last):
File "server.py", line 52, in
api_version='2019-05-29')
TypeError: init() takes at least 5 arguments (5 given)
~/quickstart/python$

Issue starting go application

This may be do to my own ignorance but following the steps in the official repo lead to an environment error.

Attaching to quickstart_go_1
go_1 | 2021/01/21 18:05:14 Error loading .env file. Did you copy .env.example to .env and fill it out?

I know my credentials are loaded because printing them console before godotenv checks for a file prints the right info

There is also an issue with placing the client in the init function if I switch back to the old way variables were initialized.
image

Then still, if the plaid client is moved out of the init function and the env variables are left inside the init, I will get an API error saying.
{
"error": "Post /link/token/create: unsupported protocol scheme """
}

Steps to reproduce error (1):
clone application
delete all folders except go and the htmll/static folders
delete Makefile
make .env
copy .env sample over
add the correct values for client_id, secret, and redirect uri
delete .env.sample
run docker-compose up -d --build

Steps to reproduce error (2):
clone application
delete all folders except go and the htmll/static folders
delete Makefile
make .env
copy .env sample over
add the correct values for client_id, secret, and redirect uri
delete .env.sample
open server.go and move environment variable declaration from init function to top
before
var (
PLAID_CLIENT_ID = ""
PLAID_SECRET = ""
PLAID_ENV = ""
PLAID_PRODUCTS = ""
PLAID_COUNTRY_CODES = ""
PLAID_REDIRECT_URI = ""
APP_PORT = ""
client *plaid.Client = nil
)

after

var (
// set constants from env
PLAID_CLIENT_ID = os.Getenv("PLAID_CLIENT_ID")
PLAID_SECRET = os.Getenv("PLAID_SECRET")
PLAID_ENV = os.Getenv("PLAID_ENV")
PLAID_PRODUCTS = os.Getenv("PLAID_PRODUCTS")
PLAID_COUNTRY_CODES = os.Getenv("PLAID_COUNTRY_CODES")
PLAID_REDIRECT_URI = os.Getenv("PLAID_REDIRECT_URI")
APP_PORT = os.Getenv("APP_PORT")
)
run docker-compose up -d --build

Steps to reproduce error (3):
clone application
delete all folders except go and the htmll/static folders
delete Makefile
make .env
copy .env sample over
add the correct values for client_id, secret, and redirect uri
delete .env.sample
now move client declaration outside of the function
before

func init() {
// stuff before
// create Plaid client
client, err = plaid.NewClient(plaid.ClientOptions{
PLAID_CLIENT_ID,
PLAID_SECRET,
environments[PLAID_ENV],
&http.Client{},
})
if err != nil {
panic(fmt.Errorf("unexpected error while initializing plaid client %w", err))
}
}

after

func init() {
/// stuff is in here
}
var client = func() *plaid.Client {
client, err := plaid.NewClient(plaid.ClientOptions{
PLAID_CLIENT_ID,
PLAID_SECRET,
environments[PLAID_ENV],
&http.Client{},
})
if err != nil {
panic(fmt.Errorf("unexpected error while initializing plaid client %w", err))
}
return client
}()

run docker-compose up -d --build

Python 3 jsonify on b64encode(asset_report_pdf) throws TypeError exception

The server.py Asset Report code attempts to jsonify the base-64-encoded PDF report:

return jsonify({
    'error': None,
    'json': asset_report_json,
    'pdf': base64.b64encode(asset_report_pdf),
  })

For Python 3, this throws a TypeError exception:

[2019-04-24 15:10:09,368] ERROR in app: Exception on /assets [GET]
Traceback (most recent call last):
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/app.py", line 2292, in wsgi_app
    response = self.full_dispatch_request()
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/app.py", line 1815, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/app.py", line 1718, in handle_user_exception
    reraise(exc_type, exc_value, tb)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/_compat.py", line 35, in reraise
    raise value
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/app.py", line 1813, in full_dispatch_request
    rv = self.dispatch_request()
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/app.py", line 1799, in dispatch_request
    return self.view_functions[rule.endpoint](**req.view_args)
  File "server.py", line 158, in get_assets
    'pdf': base64.b64encode(asset_report_pdf),
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/json/__init__.py", line 321, in jsonify
    dumps(data, indent=indent, separators=separators) + '\n',
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/json/__init__.py", line 179, in dumps
    rv = _json.dumps(obj, **kwargs)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/json/encoder.py", line 199, in encode
    chunks = self.iterencode(o, _one_shot=True)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/json/encoder.py", line 257, in iterencode
    return _iterencode(o, 0)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/site-packages/flask/json/__init__.py", line 81, in default
    return _json.JSONEncoder.default(self, o)
  File "/Users/gbehm/miniconda3/envs/plaid37/lib/python3.7/json/encoder.py", line 179, in default
    raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type bytes is not JSON serializable

In Python 3, base64.b64encode(asset_report_pdf) accepts a bytes-like object and returns encoded bytes. The interface changed from Python 2.7, where base64.b64encode(asset_report_pdf) accepts a str and returns an encoded str.

For Python 3, the output of base64.b64encode(asset_report_pdf) should be converted to str before attempting to jsonify.

Sudden 'Internal Error Ocurred' Upon submitting Username and Password (/link/item/create call)

Hi, this integration has been working fine until sometime last week/today. When using the Sandbox server, the 'user_good' 'pass_good' combination used to work fine, but now I'm receiving a page stating "Internal error Occured, we have been notified about the problem". The error message I am seeing in the console is: "the service responded with a status of 429 development.plaid.com/link/item/create".

This has been working fine on one of our app servers which we haven't changed code for in a while, so guessing it's a change on Plaid's side. Here's a reproducible example, where "index2.ejs" is similar to the given index.html:

# In app.py:
//Endpoint to reach Plaid Banking welcome screen
@app.route('/plaid/development/<string:customerId>')
def indexDevelopment(customerId):
  return render_template(
    'index2.ejs',
    plaid_public_key=PLAID_PUBLIC_KEY,
    plaid_environment="development",
    plaid_products=PLAID_PRODUCTS,
    plaid_country_codes=PLAID_COUNTRY_CODES,
    plaid_oauth_redirect_uri="http://localhost:5000/oauth-response2.html",
    plaid_oauth_nonce=PLAID_OAUTH_NONCE,
    customerId=customerId
  )

Plaid Quickstart - No Institutions

After walking through the steps provided at https://dashboard.plaid.com/overview/sandbox I am not able to select an institution. The steps I followed are specific to Ruby.

Uploading Screen Shot 2018-11-04 at 5.34.28 PM.png…

Steps taken:

  1. git clone and cd into the directory
  2. bundle install
  3. copy and paste the keys provided on the page into the terminal
  4. launch file with ruby app.rb
  5. navigate to localhost:4567

Institution Search Failing

First, thanks for providing this really useful resource...

Searching institutions gives me a "public key" error via console, but I have verified my public key is correct in the server.py file. Running python 3 and using Chrome. Thanks!

image

image

Ruby quickstart app: unable to get Identity

After running the ruby example app. I tried to call get Identity, but I got the following error:

Uncaught TypeError: Cannot read property 'names' of undefined

Screen Shot 2019-12-04 at 4 47 32 PM

It happens with multiple banks (I tried 3-4 banks).
Nothing is shown under the section to send a request to get Identity. Nor a result neither an error.

Getting invalid key message

  • Sign up for a free plaid developer account.
  • git clone quickstart
  • change client_id, secret, public_key and environment=development (python=>server.py, node=>set environment variables as explained on the instructions.
  • Start either python or node application as indicated on the instructions.
  • Attempt to connect to a bank
  • I get the following message: Invalid key. The public key you provided was incorrect. Your public key is available from the Plaid dashboard.
  • I get the following message on stdout when running the python application:
  Development is not intended for production usage.
                Swap out url for https://api.plaid.com
                via Client.config before switching to production

Trying to fetch institution by id throws cors error in production

Hi,

I am sending a post request to /institutions/get_by_id from browser,
Until now I was in sandbox environment where it was working fine,

But after deploying it to production, it throws me cors error

has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. 

Can this not work in production?
Should I send this request from my server instead of my client?

How to do money transfer?

I use nodejs quick start project, where I could logoin to any of the financial institutions and then could get few apis to accesss. I would like to transfer few usd to another account, how do I do that?

React component class version

Hi, I am trying to implement Plaid example as a React Component class. I noticed your code is in the index.ejs file.

Is there a way to redo this to work as in a React Component class instead?

Below is my code which obviously isn't working.

import React from 'react';
import { Meteor } from 'meteor/meteor';
import Modal from 'react-modal';

export default class PlaidClient extends React.Component {

    constructor(props) {
        super(props);
        this.state = {
        };
    }

    makeRequest(){
        var handler = Plaid.create({
            apiVersion: 'v2',
            clientName: 'Plaid Walkthrough Demo',
            env: 'sandbox',
            product: ['transactions'],
            key: '24bca70c22bf0174f2b4e10bbe3932',
            onSuccess: function(public_token) {
              $.post('/get_access_token', {
                public_token: public_token
              }, function() {
                $('#container').fadeOut('fast', function() {
                  $('#intro').hide();
                  $('#app, #steps').fadeIn('slow');
                });
              });
            },
          });
    }

    onClick(e){
       //Not sure what to call here.
        
    }

    

    render(){
        return(
            <div id="container">
                <button className="button" onClick={this.onClick.bind(this)}>Connect your Credit Card(s)</button>
                <Modal>
                    
                </Modal>
            </div>
        );
    }

};

Plaid Queries

Hi @michaelckelly,

Does plaid allow you to limit the location for institutions to select from e.g. UK?

Also, can plaid limit these UK institutions that use Open Banking only to select from or how can this be done?

Thanks

npm ERR! command sh -c react-scripts start

Hi,

I am running the quickstart on a Apple M1 without Docker. Following the instructions, this is what I received upon starting the frontend application. Any ideas?

Fatal error in , line 0

Check failed: allocator->SetPermissions(reinterpret_cast<void*>(region.begin()), region.size(), PageAllocator::kNoAccess).

#FailureMessage Object: 0x16fd98ab8
1: 0x100167d34 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
2: 0x100eb42fc V8_Fatal(char const*, ...) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
3: 0x100805928 v8::internal::wasm::WasmCodeManager::Decommit(v8::base::AddressRegion) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
4: 0x100808fa8 v8::internal::wasm::NativeModule::FreeCode(v8::internal::Vector<v8::internal::wasm::WasmCode* const>) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
5: 0x100818190 v8::internal::wasm::WasmEngine::FreeDeadCodeLocked(std::__1::unordered_map<v8::internal::wasm::NativeModule*, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocatorv8::internal::wasm::WasmCode* >, std::__1::hashv8::internal::wasm::NativeModule*, std::__1::equal_tov8::internal::wasm::NativeModule*, std::__1::allocator<std::__1::pair<v8::internal::wasm::NativeModule* const, std::__1::vector<v8::internal::wasm::WasmCode*, std::__1::allocatorv8::internal::wasm::WasmCode* > > > > const&) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
6: 0x100815e98 v8::internal::wasm::WasmEngine::PotentiallyFinishCurrentGC() [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
7: 0x10081730c v8::internal::wasm::WasmEngine::ReportLiveCodeForGC(v8::internal::Isolate*, v8::internal::Vectorv8::internal::wasm::WasmCode*) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
8: 0x1008176bc v8::internal::wasm::WasmEngine::ReportLiveCodeFromStackForGC(v8::internal::Isolate*) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
9: 0x1003a0e04 v8::internal::StackGuard::HandleInterrupts() [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
10: 0x1006dc5c0 v8::internal::Runtime_StackGuard(int, unsigned long*, v8::internal::Isolate*) [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
11: 0x1009cd90c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
12: 0x1009666b0 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
13: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
14: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
15: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
16: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
17: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
18: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
19: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
20: 0x10095dc44 Builtins_ArgumentsAdaptorTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
21: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
22: 0x10095dc44 Builtins_ArgumentsAdaptorTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
23: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
24: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
25: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
26: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
27: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
28: 0x10095dc44 Builtins_ArgumentsAdaptorTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
29: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
30: 0x10095dc44 Builtins_ArgumentsAdaptorTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
31: 0x100966614 Builtins_InterpreterEntryTrampoline [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
32: 0x100a19b9c Builtins_PromiseFulfillReactionJob [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
33: 0x100985788 Builtins_RunMicrotasks [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
34: 0x100963da8 Builtins_JSRunMicrotasksEntry [/Users/jason/.nvm/versions/node/v15.8.0/bin/node]
35: 0x160008000
npm ERR! code 1
npm ERR! path /Users/jason/code/quickstart/frontend
npm ERR! command failed
npm ERR! command sh -c react-scripts start

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/jason/.npm/_logs/2021-02-17T20_26_54_399Z-debug.log

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.