cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Connection timed out - connect(2) for "api.dropbox.com" port 443

Connection timed out - connect(2) for "api.dropbox.com" port 443

tyler d.4
New member | Level 1

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.

1 Reply 1

Greg-DB
Dropbox Staff

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
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?