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

调用Monzo Auth API获取access token时遇client_id未知错误求助

Troubleshooting "Invalid request: required parameter client_id is unknown" in Monzo Auth API

Let’s walk through the most likely issues causing this error — I’ve seen this trip up a lot of Monzo API developers, so let’s break it down:

  • You’re using the wrong ID entirely
    The GET /ping/whoami endpoint returns your user account ID, not the OAuth client_id required for the Auth API. You need to create a dedicated OAuth client in the Monzo Developer Console (under the "Clients" section) — that’s where you’ll get the valid client_id (and matching client_secret) for auth flows. This is the #1 mistake here, since the two IDs look similar but serve completely different purposes.

  • Your parameter isn’t being passed in the correct format
    Monzo’s OAuth token endpoint (POST /oauth2/token) expects parameters to be sent as application/x-www-form-urlencoded (form data), not JSON. If you’re wrapping client_id in a JSON body or appending it to the URL query string, the API won’t recognize it. Here’s a correct example using curl:

    curl -X POST "https://api.monzo.com/oauth2/token" \
      -d "client_id=your_valid_oauth_client_id" \
      -d "client_secret=your_client_secret" \
      -d "grant_type=authorization_code" \
      -d "code=your_authorization_code" \
      -d "redirect_uri=https://your-redirect-uri.com"
    
  • You’ve misspelled the parameter name
    Double-check that you’re using exactly client_id (lowercase, underscore included). Variants like clientId, ClientID, or client-id will be treated as unknown parameters by the API.

  • You’re mixing environments
    If you’re testing in the Monzo Playground, make sure the client_id you’re using was created for the playground environment (not production). While the API base URL is often the same, mismatched environment credentials can still trigger validation errors.

Start with verifying your client_id source first — that’s almost certainly the issue if you pulled it from whoami. Once you have the correct OAuth client ID, double-check the request format and parameter spelling, and you should be good to go.

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.19 03:36:55