Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
mikechiu
2 years agoExplorer | Level 4
Shared links inheritance behavior in Team Space model
Hi, I am working on getting the shared links of a file or a folder along with it's parent's shared links with API list_shared_links. However, I got different response from Team Space and Team Fo...
Greg-DB
Dropbox Community Moderator
2 years agomikechiu If you can share a sample like Здравко described, that would be helpful. Thanks!
mikechiu
2 years agoExplorer | Level 4
Hi @Greg-DB and @Здравко , thanks for your reply.
Why do you think there should be more links? 🤔 Are there available such links? Is it certain?
Yes, I think when I list child file's shared links, there should be parent's shared links in the response.
I test upstream API via Postman and Curl.
Below are my detailed steps:
1. Get team admin access token
2. List all namespaces
3. List mike chiu 's team_member_folder with namespace: ns:4710493057
mike chiu's team_member_id: dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk
4. List folderTest_shared_links_inheritance(id:sK5VCkFxNtoAAAAAAAAAZA)
There is a file named EWAU.png (id:sK5VCkFxNtoAAAAAAAAAZQ) under this folder
5. List shared links of folder Test_shared_links_inheritance with header Dropbox-API-Select-User: dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk
❯ curl -s -XPOST -H "Authorization: Bearer $dt" -H "Content-Type: application/json" -H "Dropbox-API-Select-User: dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk" -d '{"path": "id:sK5VCkFxNtoAAAAAAAAAZA"}' https://api.dropboxapi.com/2/sharing/list_shared_links | jq .
{
"links": [
{
".tag": "folder",
"url": "https://www.dropbox.com/scl/fo/(redated)...",
"id": "id:sK5VCkFxNtoAAAAAAAAAZA",
"name": "Test_shared_links_inheritance",
"path_lower": "/test_shared_links_inheritance",
"link_permissions": {
"resolved_visibility": {
".tag": "public"
},
"requested_visibility": {
".tag": "public"
},
"can_revoke": true,
"effective_audience": {
".tag": "public"
},
"link_access_level": {
".tag": "viewer"
},
"visibility_policies": [
{
"policy": {
".tag": "public"
},
"resolved_policy": {
".tag": "public"
},
"allowed": true
},
{
"policy": {
".tag": "team_only"
},
"resolved_policy": {
".tag": "team_only"
},
"allowed": true
},
{
"policy": {
".tag": "password"
},
"resolved_policy": {
".tag": "password"
},
"allowed": true
}
],
"can_set_expiry": true,
"can_remove_expiry": true,
"allow_download": true,
"can_allow_download": true,
"can_disallow_download": true,
"allow_comments": false,
"team_restricts_comments": false,
"audience_options": [
{
"audience": {
".tag": "public"
},
"allowed": true
},
{
"audience": {
".tag": "team"
},
"allowed": true
},
{
"audience": {
".tag": "no_one"
},
"allowed": true
}
],
"can_set_password": true,
"can_remove_password": true,
"require_password": false,
"can_use_extended_sharing_controls": true
},
"team_member_info": {
"team_info": {
"id": "(redated)",
"name": "(redated)"
},
"display_name": "Mike Chiu",
"member_id": "dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk"
}
}
],
"has_more": false
}
6. listEWAU.png (id:sK5VCkFxNtoAAAAAAAAAZQ)'s shared link with same header (Dropbox-API-Select-User)
❯ curl -s -XPOST -H "Authorization: Bearer $dt" -H "Content-Type: application/json" -H "Dropbox-API-Select-User: dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk" -d '{"path": "id:sK5VCkFxNtoAAAAAAAAAZQ"}' https://api.dropboxapi.com/2/sharing/list_shared_links | jq .
{
"links": [],
"has_more": false
}
❯ curl -s -XPOST -H "Authorization: Bearer $dt" -H "Content-Type: application/json" -H "Dropbox-API-Select-User: dbmid:AABoDSTDeZtrGKUDsWr8OP_qv9l6s8itCCk" -d '{"path": "id:sK5VCkFxNtoAAAAAAAAAZQ", "direct_only": false}' https://api.dropboxapi.com/2/sharing/list_shared_links | jq .
{
"links": [],
"has_more": false
}
Hopefully those steps are detailed enough and please let me know if anything I can provide to you.
Thanks.
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!