Connecting to DropBox

I am trying to set up a dropbox connection by following the tutorial at http://sitepoint.com/access-dropbox-using-php

I substituted the app_key and app_secret values for the app I defined in dropbox in the bootstrap.php file but the autorize.php always responds with “Unable to get request token”.

I have obviously overlooked one simple step in the authorization process but I can’t figure out what step I have missed.

The post is from 2012 maybe dropbox changed their api a bit?

I will look when I’m home trough the code see if I can find something.

Well the dropbox code there looks nothing whatever like the code is the dropbox sdk but the current dropbox sdk code is labelled version 1 so something there doesn’t make sense.

Every pieces of example dropbox code I look at appears to expect a completely different API - looks like they perhaps had several dozen completely different ones before the current version one.

I have thrown away everything from that tutorial and started over by uploading a copy of the actual SDK to my hosting.

I have now succeeded in getting code to upload a file to DropBox to work.

concept_core thanks for the offer of help. Looks like that tutorial is no longer at all relevant.

2 Likes

Felgall glad you got it working.

My phone was dead so I could not check it out but I think the post on sitepoint should point out that the php api doesn’t work anymore.

1 Like

[off-topic]
It is advisable to change your login details immediately to prevent an “Identity Theft” :slight_smile:

I am currently reading a Jeffrey Deaver novel, “The Broken Window” which is all about this increasing internet problem.

Beware!

[/off-topic]

Neither the DropBox script that didn’t work nor the one that did uses my login details. The one that didn’t work used the access key for the specific APP and then needed to have an authorise step run to get access (which didn’t work) and the one that did work uses a request token that was generated from the access key.

The code that has the access is on my web site set up as a cron job with everything above the public_html so someone would need physical access to the server of have my hosting account login to be able to use that token to break into my dropbox account.

I agree with you that everyone should change their password immediately upon setting up any account that generates an initial password for you. I usually use KeePass to generate passwords that will be impossible to guess.

One alternative to passwords I came across a few months ago that looked like a good idea is a variation on the lost password link where instead of allowing you to set up a replacement password it generates a one time access token to give you access to whatever site you are logging in to - effectively changing your login details for you on each and every login.

Sorry for taking this off-topic a bit, but @swader, it sounds like this article may benefit from being updated?

I wouldn’t consider that as off topic at all.

1 Like

Indeed. I’ll make a note that we should handle this asap.

3 Likes

Btw it might be easier to just use their SDK: https://packagist.org/packages/dropbox/dropbox-sdk

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.