Can't get Dropbox to work - oauth token error

Can't get Dropbox to work - oauth token error

by Michael Buchanan -
Number of replies: 7

I have a Moodle 2.4.7 instance and am trying to get the Dropbox repository working.  Within the Dropbox App Console, I registered for an API key.  The permission type is Full Dropbox.  I have left the OAuth redirect URLs and Drop-in domains blank.

I put in the App key and App secret in Moodle.  But when I try to add a file in Moodle from the Dropbox repository, I get the error message, "error/Error while requesting an oauth token."

There are many more options for setting up the app in Dropbox than are reflected in the Moodle documentation, I'm wondering if I'm setting up the app wrong or if something else is going on.  Has anyone experienced this problem?  Thanks!

Average of ratings: -
In reply to Michael Buchanan

Re: Can't get Dropbox to work - oauth token error

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Can't get Dropbox to work - oauth token error

by Michael Buchanan -

The link you mention is for the Google drive repository, but yes I did go through the Dropbox documentation, although the Moodle documentation for the Dropbox site is out of date and the actual options for creating the App are slightly different.  That's why I'm not sure I did it correctly.

In reply to Michael Buchanan

Re: Can't get Dropbox to work - oauth token error

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You are right, the oauth page I linked is for Google drive.

The last time I configured Dropbox I ran into a change Dropbox has introduced: see "DropBox asking to login repeatedly" https://moodle.org/mod/forum/discuss.php?d=226773.

I tried to configure a fresh Moodle installation just now. Dropbox people must have changed their products, they use many different terms. I too believe http://docs.moodle.org/en/Dropbox_repository needs to be updated.
In reply to Visvanath Ratnaweera

Re: Can't get Dropbox to work - oauth token error

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

I wasn't aware of that Visvanath and Michael - I will investigate this and amend the docs accordingly (assuming I am able to configure Dropboxsmile)

In reply to Mary Cooch

Re: Can't get Dropbox to work - oauth token error

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Mary

Just to add, the 2.4 installation I mentioned, even after upgrading to 2.6, still connects to Dropbox. Possibly there are no technical changes from either side, it is about the new terms Dropbox has inttroduced (if at all, I didn't check carefully).
In reply to Visvanath Ratnaweera

Re: Can't get Dropbox to work - oauth token error

by Michael Buchanan -

This seems like it might be a server issue.  I have a dev site but on a different server and both Drobox and Google repositories work fine there.  Unfortunately, the servers are completely different.  The one which works is running on Centos and the one that doesn't is Debian.  I've searched for any Apache error logs, after turning on error logging in the php.ini file but nothing interesting was recorded.  I also turned on Full debugging on the Moodle site but no error messages showed there either.  Not sure where I go from here thoughtful.

In reply to Michael Buchanan

Re: Can't get Dropbox to work - oauth token error

by Michael Buchanan -

Found the problem, it was a firewall issue.  Once I whitelisted dropbox.com on my server and ensured that the correct ports (80 and 443) were open, everything works as expected.