cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done 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

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

Greg-DB
Dropboxer

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
Poll
We love to learn from the educators who use Dropbox. Whether you teach kids, teens, adults or a combination of all three, we want to know what apps and integrations you use with Dropbox to help with teaching. Which of the ones below is your favorite, or most used tool?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropboxer
What do Dropbox user levels mean?
Need more support?