[从Intuit快速手册获取令牌时为InvalidFieldFormat

问题描述 投票:0回答:1

[当我尝试致电时:

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

内容类型:应用程序/ x-www-form-urlencoded接受:application / json授权:基本XXX我从每个平台(卷曲,邮递员,mongodb针)获得状态:400代码:InvalidFieldFormat类型:SYSTEM。它唯一起作用的地方是Intuit游乐场。我看不到什么是无效的。

oauth-2.0 token quickbooks-online intuit
1个回答
0
投票

您正在尝试通过查询字符串传递所有内容,应该在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

© www.soinside.com 2019 - 2024. All rights reserved.