Search code examples
pythondropbox-apishared-directory

Dropbox API Shared Folders


Shared_folders is not DropboxClient attribute?? Then whose attribute is it??

why I get this error

'DropboxClient' object has no attribute 'shared_folders'

And how can I solve this?


Solution

  • I ran into this problem too. I suspect the Python API hasn't been updated to support the somewhat new /shared_folders REST API call. I managed to use the rest_client directly to access the /shared_folders API. Here is some example Python code, assuming you already have a DropboxClient object in "client":

    url, params, headers = client.request("/shared_folders/", {}, method='GET')
    response = client.rest_client.GET(url, headers)
    

    You can modify the target and params (first two args to client.request) based on the official REST API documentation for /shared_folders.