RISCfuture / dropbox

An easy-to-use client library for the official Dropbox API.
MIT License
519 stars 47 forks source link

Unauthorized authorized session. #7

Closed netguru closed 14 years ago

netguru commented 14 years ago
>>  @session = Dropbox::Session.deserialize("xxxxxxxxxx")
=> #<Dropbox::Session xxxxxxxxxx (authorized)>
>> @session.authorized?
=> true
>> @session.list('/')
Dropbox::UnsuccessfulResponseError: HTTP status Net::HTTPUnauthorized received: http://api.dropbox.com/0/metadata/sandbox?list=true
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:477:in `api_internal'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:483:in `api_json'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:467:in `get'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:393:in `metadata_without_memo'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/memoization.rb:90:in `send'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/memoization.rb:90:in `metadata_with_memo'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:419:in `metadata'
    from /Library/Ruby/Gems/1.8/gems/dropbox-1.1.0/lib/dropbox/api.rb:419:in `list'
    from (irb):3
RISCfuture commented 14 years ago

How often does this happen? It's possible that the authorized key and secret expired. This could happen perhaps if it's been a very long time since that key and secret were used, or maybe the Dropbox API server had some kind of cache-clearing hiccup. In any case, is this regular or a one-time thing?

netguru commented 14 years ago

Well it looks now, like one-time thing, but there is no way the session c'd expire - it was pretty fresh... 5-6 days old or somehting like that. We have generated a new one and it is working well since. We will let you know if the problem reoccurres.

webdev commented 13 years ago

I'm consistently having this issue ree-1.8.7-head > session.authorized? => true ree-1.8.7-head > session.list('/') Dropbox::UnsuccessfulResponseError: HTTP status Net::HTTPForbidden received: http://api.dropbox.com/0/metadata/sandbox?list=true from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:477:in api_internal' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:483:inapi_json' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:467:in get' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:393:inmetadata_without_memo' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/memoization.rb:90:in send' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/memoization.rb:90:inmetadata_with_memo' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:419:in metadata' from /Users/xxxxxxx/.rvm/gems/ree-1.8.7-head/gems/dropbox-1.1.2/lib/dropbox/api.rb:419:inlist'

please help

RISCfuture commented 13 years ago

Are you able to successfully make API requests, using the same auth credentials, using a different API? (Like the official Ruby API, or the Objective-C API.)

netguru commented 13 years ago

would you guys be able to setup a new thread or let me know how to unsubscribe from this one? Thanks :)

webdev commented 13 years ago

sorry netguru, not sure how to send an isolated message to only one person.

RISCfuture, haven't tried the other api. it seems like i have to bypass session.authorize_url on the cli. ideas?