【问题标题】:Plaid - can't run (python) quickstart格子 - 无法运行 (python) 快速入门
【发布时间】: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


    【解决方案1】:

    这里的问题是您指定了一个 REDIRECT_URI,但尚未将开发人员仪表板配置为接受它作为您的 URI。

    不幸的是,错误消息目前已被吞并,仅在网络选项卡中可见。我们将对其进行修复,以便将这些错误传播到更明显的地方。

    【讨论】:

    • 感谢@Alex 的回复。我提取了 index.html 的最新更新,错误就在页面上。我还配置了 REDIRECT_URI,所以现在看起来还可以。可以选择按钮,我会得到一个银行列表。我会继续努力解决问题,如果有其他问题,我会再联系。
    猜你喜欢
    • 2021-10-04
    • 1970-01-01
    • 2021-10-22
    • 2014-12-18
    • 1970-01-01
    • 1970-01-01
    • 2018-09-17
    • 2016-02-24
    • 1970-01-01
    相关资源
    最近更新 更多