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 前端echarts坐标轴问题
  • ¥15 CMFCPropertyPage
  • ¥15 ad5933的I2C
  • ¥15 请问RTX4060的笔记本电脑可以训练yolov5模型吗?
  • ¥15 数学建模求思路及代码
  • ¥50 silvaco GaN HEMT有栅极场板的击穿电压仿真问题
  • ¥15 谁会P4语言啊,我想请教一下
  • ¥15 这个怎么改成直流激励源给加热电阻提供5a电流呀
  • ¥50 求解vmware的网络模式问题 别拿AI回答
  • ¥24 EFS加密后,在同一台电脑解密出错,证书界面找不到对应指纹的证书,未备份证书,求在原电脑解密的方法,可行即采纳