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

Unable to get List working. (subdomain api-content) #17

Open
Gajol opened this issue May 13, 2012 · 2 comments
Open

Unable to get List working. (subdomain api-content) #17

Gajol opened this issue May 13, 2012 · 2 comments

Comments

@Gajol
Copy link

Gajol commented May 13, 2012

When running the basic tool and using the Linux Magazine (August 2011) software, I am unable to get list() working. I believe this maybe due to the Dropbox API needing api-content.dropbox.com as opposed to api.dropbox.com.
https://www.dropbox.com/developers/reference/api#files-GET
https://api-content.dropbox.com/1/files//

I get a 404 Not Found regardless of what directory/location I attempt to look at.

With debug on the Net::Dropbox::API the _talk URL is:
https://api.dropbox.com/1/files/dropbox/home/Photos?oauth_cons....

Is there a way to control the "api" aspect of the subdomain? Or does the API need to be enhanced.

Note: I am able to get the account_info() as this uses the api.drop... subdomain.

Thanks Doug.

@norbu09
Copy link
Owner

norbu09 commented May 16, 2012

Looks like I may need to look into this. We already have calls (get_file and put_file) that use the api-content subdomain but list used to work against the api subdomain.

I have not done a lot with this lib for a while now so need to get some old apps dusted off before i can test. Happy to incorporate any patches though, in case you have something already.

cheers
lenz

@tomasskare
Copy link

I just noticed this too, but I think the error is not the sub-domain. The /files GET API is used to actually get file content, not directory listing. To do this, you should use the /metadata GET API (to api.dropbox.com).

I changed the list sub routine to just use /metadata instead of /files, and then it worked fine.

The reason for the 401 Not Found that you get is because /files need the path to point to a file, not a directory.

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