使用quickbooks api进行身份验证时,oauth token_rejected

时间:2015-01-14 17:44:55

标签: ruby-on-rails ruby oauth

我按照http://minimul.com/integrating-rails-and-quickbooks-online-via-the-version-3-api-part-1.html上的说明操作,然后收到了'token_rejected'在使用quickbooks进行身份验证后:

OAuth::Problem in VendorsController#oauth_callback

token_rejected

Request

Parameters:

{"oauth_token"=>"blah",
 "oauth_verifier"=>"blah",
 "realmId"=>"blah",
 "dataSource"=>"QBO"}

------------------------------------------------------------------------------

#vendors_controller.rb:
... 
def oauth_callback
  at = session[:qb_request_token].get_access_token(:oauth_verifier => params[:oauth_verifier])
  token = at.token
  secret = at.secret
  realm_id = params['realmId']
  redirect_to 'vendors/index', notice: "Your QuickBooks account has been successfully linked."
end
...

traceroute定义" at = session [:qb_request_token] ...."作为抛出错误的行。有任何想法吗? Rails 3.1.3 - ruby​​ 1.9.3p194(2012-04-20修订版35410)[x86_64-linux]

1 个答案:

答案 0 :(得分:0)

错误表示未找到访问令牌,已过期或无效。我会尝试刷新访问令牌。