views:

44

answers:

1

I want to write a ruby app for personal use that access my personal dropbox through their API. I'm using Tim Morgan gem 'dropbox' version 1.1.1 What I don't understand is the difference between a developer_key and a consumer_key. The gem docs say that I have to use the consumer_key, but when I registered my app on dropbox.com I received only a developer key secret pair (and that's what I put in Dropbox::Session.new)

Anyway the error I get from ruby at every API call is:

Dropbox::UnsuccessfulResponseError: HTTP status Net::HTTPBadRequest

any idea??

+1  A: 

You have to redirect your user to the oauth page where he will grant you the authorization to access the datas. This can be done wit something like that:

  dropbox_session = Dropbox::Session.new('bla', 'blabla')
  redirect_to dropbox_session.authorize_url(:oauth_callback => root_url)
hellvinz