Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
Hello!
Sorry for my English.
I have a shared link.
I need to get a list of files.
I execute the query:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \ --header "Authorization: Bearer <<my_app_token>>" \ --header "Content-Type: application/json" \ --data "{\"path\": \"\",\"shared_link\":\"https://www.dropbox.com/sh/doxhqsfkjtiahkns/AADHM1f9uagbhGLQHgtERCiLcna\",\"recursive\": false,\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false,\"include_mounted_folders\": true}"
Response:
Error in call to API function "files/list_folder": request body: shared_link: expected object, got string
Why? How right?
Thank you.
The /2/files/list_folder endpoint expects an object for 'shared_link', with a key 'url' and optionally a key 'password'. So, it should look like this:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \ --header "Authorization: Bearer <<my_app_token>>" \ --header "Content-Type: application/json" \ --data "{\"path\": \"\",\"shared_link\":{\"url\":\"https://www.dropbox.com/sh/doxhqxkjtiahkns/AADHM1f9uaFGLQHgtERCiLcna\"},\"recursive\": false,\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false,\"include_mounted_folders\": true}"
I recommend using the API v2 Explorer to help build these.
The /2/files/list_folder endpoint expects an object for 'shared_link', with a key 'url' and optionally a key 'password'. So, it should look like this:
curl -X POST https://api.dropboxapi.com/2/files/list_folder \ --header "Authorization: Bearer <<my_app_token>>" \ --header "Content-Type: application/json" \ --data "{\"path\": \"\",\"shared_link\":{\"url\":\"https://www.dropbox.com/sh/doxhqxkjtiahkns/AADHM1f9uaFGLQHgtERCiLcna\"},\"recursive\": false,\"include_media_info\": false,\"include_deleted\": false,\"include_has_explicit_shared_members\": false,\"include_mounted_folders\": true}"
I recommend using the API v2 Explorer to help build these.
Hi there!
If you need more help you can view your support options (expected response time for a ticket is 24 hours), or contact us on X or Facebook.
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!