【发布时间】:2020-11-26 22:58:14
【问题描述】:
我正在使用 Plaid API found here,但似乎无法让快速入门正确运行。我最近的尝试如下
import base64
import os
...
...
app = Flask(__name__)
# Fill in your Plaid API keys - https://dashboard.plaid.com/account/keys
PLAID_CLIENT_ID = 'xxxxxxxx' #os.getenv('xxxxx')
PLAID_SECRET = 'xxxxx' #os.getenv('xxxx')
...
PLAID_ENV = 'sandbox' #os.getenv('PLAID_ENV', 'sandbox')
...
PLAID_PRODUCTS = 'transactions' #os.getenv('PLAID_PRODUCTS', 'transactions').split(',')
...
PLAID_COUNTRY_CODES = 'US' #os.getenv('PLAID_COUNTRY_CODES', 'US').split(',')
def empty_to_none(field):
value = os.getenv(field)
if value is None or len(value) == 0:
return None
return field
...
PLAID_REDIRECT_URI = empty_to_none('http://localhost:8000/oauth-response.html')
client = plaid.Client(client_id=PLAID_CLIENT_ID,
secret=PLAID_SECRET,
environment=PLAID_ENV,
api_version='2019-05-29')
@app.route('/')
def index():
return render_template('index.html',)
当我运行 server.py 并打开浏览器时,无法选择该按钮。此外,银行列表也会不断加载。所以我检查了 chrome 开发工具我发现错误 link-initialize.js:1 Uncaught Error: Missing Link parameter. Link requires a key or token to be provided. 这是因为我没有在 render_template 中传递一些东西吗?我无法从 index.html 文件 found here 中看出它是(python)存储库中唯一引用的前端文档。我查看了found here 的问题,但它已经有好几年了,我相信集成已经改变......
【问题讨论】:
标签: javascript python html plaid