Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropbox getAuthorizationMethod incorrect #98

Closed
thomaswelton opened this issue Aug 30, 2013 · 4 comments
Closed

Dropbox getAuthorizationMethod incorrect #98

thomaswelton opened this issue Aug 30, 2013 · 4 comments

Comments

@thomaswelton
Copy link
Contributor

https://github.com/Lusitanian/PHPoAuthLib/blob/master/src/OAuth/OAuth2/Service/Dropbox.php#L79

The authorization method is listed as being AUTHORIZATION_METHOD_QUERY_STRING_V2 this wasn't working for me when doing request('account/info'); it makes a URL like this with https://api.dropbox.com/1/account/info?oauth2_access_token=fsSVcJsloq0AAAAAAAAAAfWcHL3iaxAN9XvI1wNObJbQNwtHAx6TdjrrLhvt078K
the response is

{"error": "Parameter not found: oauth_token"}

changing it to AUTHORIZATION_METHOD_QUERY_STRING works for me, makes the url https://api.dropbox.com/1/account/info?access_token=fsSVcJsloq0AAAAAAAAAAfWcHL3iaxAN9XvI1wNObJbQNwtHAx6TdjrrLhvt078K and properly returns

{"referral_link": "http://db.tt/tF0ZIniZ", "display_name": "Thomas Welton", "uid": 43388555, "country": "GB", "quota_info": {"shared": 6286289, "quota": 2147483648, "normal": 1422535}, "email": "thomas@clicklabs.co.uk"}

@flavioheleno I see you were to one to kindly provide this class, can you confirm this bug? Are there some requests or actions that may require a different authorization method?

PR to follow to fix the issue I'm having. But I'd like to get some confirmation or do some more testing.

@flavioheleno
Copy link
Contributor

@thomaswelton during my tests, using AUTHORIZATION_METHOD_QUERY_STRING_V2 was working without any problems..I'll check on it again and get back to you ASAP :)

@flavioheleno
Copy link
Contributor

and this is the moment when I want to kill myself. I commited the wrong version of Dropbox.php, I've changed that to AUTHORIZATION_METHOD_QUERY_STRING but didn't notice and didn't commit it..
I'm so sorry!

@thomaswelton
Copy link
Contributor Author

I know that feeling.
If it'll make you feel better check out this commit I added to the project, https://github.com/Lusitanian/PHPoAuthLib/pull/89/files
woops!

@lusitanian this should be good to merge #99

@Burnett01
Copy link

Thanks for the fix guys 👍

@PeeHaa PeeHaa closed this as completed in 643a615 Aug 31, 2013
PeeHaa added a commit that referenced this issue Aug 31, 2013
Update dropbox authorization method fixes #98
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants