来自Intuit IPP的请求令牌请求拒绝许可 [英] Request for Request Token from Intuit IPP gives permission denied

查看:169
本文介绍了来自Intuit IPP的请求令牌请求拒绝许可的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的本地开发网站上做这个,没有问题。但是,当我尝试从我的实时站点设置QuickBooks文件的新连接时,我得到一个权限被拒绝的错误。



这是错误返回:Post https://oauth.intuit.com/oauth/v1/get_request_token :权限被拒绝 p>

这里是请求头

 内容类型
应用程序/ x-www-form-urlencoded

授权
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

以下是请求正文:

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



<编> ----编辑----



完全没有回应,我的Go代码出现错误:

  response,err:= client.Do(request)

这就是为什么我在这个问题中添加了一些标签(go和google-app-engine)来尝试扩大我的观众。我很确定这个错误与我的OAuth库发送请求的方式相同。我正在使用这个库: https://github.com/kurrik/oauth1a ,它一直在工作罚款在我的本地开发网站,但给我的权限被拒绝错误,当我从我的生活网站打电话。我认为开发应用程序引擎服务器从现场引擎的方式创建请求的方式有所不同,但我不确定究竟是什么。



任何想法?

解决方案

尤里卡!我想到了!谢谢玛纳斯,如果没有你提供的最后一个链接,我不会找到这个解决方案。对于任何想知道的人:我必须使用appengine.urlfetch库创建一个自定义http.Client。一旦我明白了这一点,解决方案很简单,我只需要将创建客户端的一行代码更改为:

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

问题解决了!


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?

解决方案

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!

这篇关于来自Intuit IPP的请求令牌请求拒绝许可的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆