Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Dear gentlemen:
I got some troubles in using the Core API in Ruby.
All codes are written according to this document: https://www.dropbox.com/developers/core/start/ruby
as below:
def new_from_dropbox
@uploads = Upload.order('created_at DESC')
@upload = Upload.new
# Install this the SDK with "gem install dropbox-sdk"
require 'dropbox_sdk'
# Get your app key and secret from the Dropbox developer website
app_key = '***'
app_secret = '***'
flow = DropboxOAuth2FlowNoRedirect.new(app_key, app_secret)
@authorize_url = flow.start()
end
def dropbox_confirm
require 'dropbox_sdk'
app_key = '***'
app_secret = '***'
flow = DropboxOAuth2FlowNoRedirect.new(app_key, app_secret)
access_token = flow.finish(code_param[:code].strip)
puts "================================"
puts access_token.inspect
client = DropboxClient.new(access_token)
puts "linked account:", client.account_info().inspect
root_metadata = client.metadata('/')
puts "metadata:", root_metadata.inspect
end
private
def code_param
params.require(:upload).permit(:code)
end
When i input the authorization code and the function dropbox_confirm
try to get access_token
by
access_token = flow.finish(code_param[:code].strip)
It returned an error:
Connection timed out - connect(2) for "api.dropbox.com" port 443
Anyone can help me? please.
I found some relative questions here: https://www.pythonanywhere.com/forums/topic/1806/
But that is for python.
Regards.
It looks like there was a network issue connecting to the Dropbox API. Are you still getting the error? If so, there's likely a problem with the network connection on that machine preventing you from connecting to api.dropbox.com. Do you know if there's any security software, firewall, etc. that may be doing so? You can try connecting directly to api.dropbox.com to see where the problem might be, e.g., via:
$ curl api.dropbox.com
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!