OAuth :: Unauthorized(403 Forbidden)dropbox-api

时间:2012-11-14 11:47:51

标签: ruby-on-rails-3 dropbox-api

我在此行的回调中未获取授权错误:

request_token.get_access_token(:oauth_verifier => params [:oauth_token])

下面的

是我的控制器代码:

def new
   consumer      = Dropbox::API::OAuth.consumer(:authorize)
   request_token = consumer.get_request_token
   @dropbox_auth = request_token.authorize_url(:oauth_callback => dropbox_callback_url)
end

回调:

def dropbox_callback
   consumer      = Dropbox::API::OAuth.consumer(:authorize)
   request_token = consumer.get_request_token
   request_token.get_access_token(:oauth_verifier => params[:oauth_token]) **here is the line where I am getting the error**

   client = Dropbox::API::Client.new :token => token, :secret => secret
end

0 个答案:

没有答案