dsozqcx9668 2013-08-23 20:03
浏览 33
已采纳

来自Intuit IPP的请求令牌请求使权限被拒绝

I am doing this on my local development site without problems. But when I try to setup a new connection to a QuickBooks file from my live site, I get a permission denied error.

Here is the error returned: "Post https://oauth.intuit.com/oauth/v1/get_request_token: permission denied"

Here are the request headers

Content-Type
  application/x-www-form-urlencoded

Authorization
  OAuth oauth_consumer_key="MY_KEY",
  oauth_nonce="MY_NONCE",
  oauth_signature="MY_SIG",
  oauth_signature_method="HMAC-SHA1",
  oauth_timestamp="1377287041",
  oauth_version="1.0"

Here is the request body:

oauth_callback=http%3A%2F%2Fwww.intheloop-notes.com%2Fqb%2Fconnect%2Freturn%2F

---- EDIT ----

The response is nil altogether, I am getting an error from my Go code on:

response, err := client.Do(request)

Which is why I have added a couple of tags to this question (go and google-app-engine) to try and broaden my audience. I am pretty sure that the error is in the way that my OAuth library is sending the request. I am using this library: https://github.com/kurrik/oauth1a, which has been working just fine on my local development site, but gives me the "permission denied" error when I make the call from my live site. I think there is some difference in the way that the development app engine server creates the request from the way the live engine does, but I am not sure exactly what.

Any ideas?

  • 写回答

1条回答 默认 最新

  • dongxia026531 2013-08-26 22:03
    关注

    Eureka! I figured it out! And thank you, Manas, I would not have found this solution without that last link you gave. For anyone who is wondering: I had to create a custom http.Client using the appengine.urlfetch library. Once I figured that out, the solution was simple, I just had to change one line of code that created the client into this:

    client := urlfetch.Client(appengine.NewContext(r))
    

    Problem solved!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分
  • ¥15 delphi webbrowser组件网页下拉菜单自动选择问题