【问题标题】:InvalidFieldFormat when obtaining token from intuit quickbooks从 intuit quickbooks 获取令牌时的 InvalidFieldFormat
【发布时间】:2020-04-26 13:57:27
【问题描述】:

当我尝试打电话时:

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

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

【问题讨论】:

    标签: oauth-2.0 token quickbooks-online intuit


    【解决方案1】:

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

    你应该POSTing 这个网址: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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-27
      • 1970-01-01
      • 2014-08-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多