InvalidFieldFormat 从直觉快速手册获取令牌时



当我尝试调用:

POST/oauth2/v1/tokens/bearer?grant_type=authorization_code&code=XXX&redirect_uri=https://developer.intuit.com/v2/OAuth2Playground/RedirectUrl

内容类型:application/x-www-form-urlencode 接受:应用程序/json 授权:基本XXX 我从每个平台(卷曲,邮递员,mongodb针迹(获得状态:400代码:无效字段格式类型:系统。它唯一工作的地方是直觉游乐场。 我看不出什么是无效的。

您尝试通过查询字符串传递所有内容,并且应该在POST正文中传递它。

您应该POST到此 URL:https://oauth.platform.intuit.com/oauth2/v1/tokens/bearer

并像这样传入 HTTP 请求正文:

grant_type=authorization_code&
code=L3114709614564VSU8JSEiPkXx1xhV8D9mv4xbv6sZJycibMUI&
redirect_uri=https://www.mydemoapp.com/oauth-redirect

它是POST正文,而不是查询字符串。

这记录在Intuit的网站上: https://developer.intuit.com/app/developer/qbo/docs/develop/authentication-and-authorization/oauth-2.0#step-5-exchange-authorization-code-for-refresh-and-access-tokens

最新更新