cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Back again with another edition of 'How we use Dropbox', so find out how Emma uses to-do lists to get it all done here!

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Empty or Partial Response to list_shared_links

Empty or Partial Response to list_shared_links

sam_g
Helpful | Level 5

I was previously using get_shared_links to retrieve all shared links relevant to my dropbox. However this has started to return only a partial list of files. 

 

I've switched to list_shared_links (as get_shared_links is deprecated), however I have the same problem, and when then trying to create a shared link for a file it does not include in the response, I receive a 'shared_link_already_exists' error.

 

My code is:

 

    token = 'mytoken'
    url = "https://api.dropboxapi.com/2/sharing/list_shared_links"
    headers = {
        "Authorization": "Bearer " + token,
        "Content-Type": "application/json"
    }

    dbx = dropbox.Dropbox(token)

    r = requests.post(url, headers=headers, data=json.dumps({}), timeout=60)
    my_links = json.loads(r.content)

I'm aware that list_shared_links requires a path and will only provide the shared links within this directory (and not include files within subdirectories) however I am not receiving all of the files contained within the provided path (whether a path is supplied or not).

 

Is this an error on my side?

 

Thanks

1 Accepted Solution

Accepted Solutions

Re: Empty or Partial Response to list_shared_links

sam_g
Helpful | Level 5
Not sure what the problem was, but managed to solve by rewriting the whole thing using the python SDK.

Thanks

View solution in original post

1 Reply 1

Re: Empty or Partial Response to list_shared_links

sam_g
Helpful | Level 5
Not sure what the problem was, but managed to solve by rewriting the whole thing using the python SDK.

Thanks

View solution in original post

Who's talking

Top contributors to this post

  • User avatar
    sam_g Helpful | Level 5
What do Dropbox user levels mean?
Need more support?