You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Plaid /institutions/get接口未遵循country_codes参数问题求助

Plaid Institutions API 未遵循country_codes参数返回美国机构的问题

我是Plaid的新手,刚着手实现基础功能就遇到了问题。我无法(也不想)使用现成的Link SDK,所以尝试自行实现类似的用户交互逻辑。

根据Institutions接口文档,示例API请求如下:

curl -X POST https://sandbox.plaid.com/institutions/get \
-H 'Content-Type: application/json' \
-d '{
  "client_id": "${PLAID_CLIENT_ID}",
  "secret": "${PLAID_SECRET}",
  "count": Number,
  "offset": Number,
  "country_codes": Array
}'

我用curl或Postman执行该请求时能成功获取结果,但返回内容不符合预期。我的curl命令如下:

curl -X POST https://sandbox.plaid.com/institutions/get \
-H 'Content-Type: application/json' \
-d '{
  "client_id": "REDACTED",
  "secret": "REDACTED",
  "offset": 0,
  "count": 10,
  "country_codes": ["US"]
}'

请求成功返回,但结果里全是法国银行,显然Plaid API没有遵循请求体中的country_codes参数:

{
    "institutions": [
        {
            "country_codes": ["FR"],
            "credentials": [],
            "has_mfa": true,
            "input_spec": "unknown",
            "institution_id": "ins_122874",
            "mfa": ["code", "list", "questions", "selections"],
            "mfa_code_type": "numeric",
            "name": "Banque Populaire - Bourgogne Franche Comté",
            "oauth": true,
            "products": ["assets", "auth", "balance", "transactions", "signal", "identity_match", "income_verification", "identity", "payment_initiation", "processor_payments", "transfer"],
            "routing_numbers": []
        },
        {
            "country_codes": ["FR"],
            "credentials": [],
            "has_mfa": true,
            "input_spec": "unknown",
            "institution_id": "ins_122875",
            "mfa": ["code", "list", "questions", "selections"],
            "mfa_code_type": "numeric",
            "name": "Banque Populaire - Auvergne et Rhône-Alpes",
            "oauth": true,
            "products": ["assets", "auth", "balance", "transactions", "signal", "identity_match", "income_verification", "identity", "payment_initiation", "processor_payments", "transfer"],
            "routing_numbers": []
        },
        // 剩余8个法国机构条目省略
    ],
    "request_id": "AVhWWp9iNUGsvRb",
    "total": 11837
}

有没有人成功解决过这个问题?有没有相关的技巧或注意事项可以分享?


内容的提问来源于stack exchange,提问作者Jason Polites

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 06:14:53