cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right 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: 

Re: get_shared_links returns empty array

get_shared_links returns empty array

Ed T.2
Explorer | Level 4
Go to solution

When I call the get_shared_links API with a path, I get back a 200 but an empty links array. So in this scenario I call create_shared_link_with_settings. This API returns a "shared links already exist" error.

I am passing in a path of /Records/paul/Births/Thompson-Hayward-20160403133425.backup and my app is EvidentiaSoftware, so I expect it to be found sinc eit exists at /Apps/EvidentiaSoftware/Records/paul/Births/Thompson-Hayward-20160403133425.backup

What am I doing wrong?

var path = "/Records/paul/Births/Thompson-Hayward-20160403133425.backup"
$http.post("https://api.dropboxapi.com/2/sharing/get_shared_links",
                JSON.stringify({
                    "path": path
                }),
                {
                    headers: {
                        'Content-Type': "application/json",
                        'Authorization': 'Bearer ' + dSvc.GO.onlineStorage.D1.accessResponse.access_token
                    }
                }
            ).then(function (res) {
...

    $http.post("https://api.dropboxapi.com/2/sharing/create_shared_link_with_settings",
            JSON.stringify({
                "path": path,
                "settings": {
                    "requested_visibility": "public"
                }
            }),
            {
                headers: {
                    'Content-Type': "application/json",
                    'Authorization': 'Bearer ' + dSvc.GO.onlineStorage.D1.accessResponse.access_token
                }
            }
        ).then(function (res) {
1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

[Cross-linking for reference: https://stackoverflow.com/questions/40477103/get-shared-links-returns-empty-array ]

 

Thanks for the report! We'll look into it.

 

By the way, we recommend using /2/sharing/list_shared_links instead anyway, since /2/sharing/get_shared_links is deprecated.

 

View solution in original post

2 Replies 2

Greg-DB
Dropbox Staff
Go to solution

[Cross-linking for reference: https://stackoverflow.com/questions/40477103/get-shared-links-returns-empty-array ]

 

Thanks for the report! We'll look into it.

 

By the way, we recommend using /2/sharing/list_shared_links instead anyway, since /2/sharing/get_shared_links is deprecated.

 

Greg-DB
Dropbox Staff
Go to solution
This should be fixed now. Please let us know if you're still seeing any issues.
Need more support?