Start 2025 on time and up to date. Seamlessly integrate your calendars into Dropbox with these simple steps.

Forum Discussion

Ed T.2's avatar
Ed T.2
Explorer | Level 4
9 years ago

get_shared_links returns empty array

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) {