Take Your Search Game to the Next Level with Dropbox Dash 🚀✨ Curious how it works? Ask us here!
Forum Discussion
cristrod817
3 years agoExplorer | Level 3
Dropbox's code example for sharing a file link in Python not working
#Python code provided by Dropbox import requests import json url = "https://api.dropboxapi.com/2/sharing/get_shared_link_metadata" headers = { "Authorization": "Bearer append-current-toke...
- 3 years ago
cristrod817, as Greg pointed out, 'url' parameter is missing in your request and of course, the error message, you're receiving, notes the same. Take a look once again in the link you post above. There are 3 parameters - 1 mandatory and 2 optional. You have put only one of the optional params. 🙂 Where is the link you want to check metadata for? That's it.
Здравко
3 years agoLegendary | Level 20
cristrod817, where is your shared link? 🙃 Did you forget what you're trying achieve - to get shared link metadata? You have to provide a shared link with that url field, not just some URL! What actually do you expect to see as metadata for the 'link' you provided? 😁
Hope this gives the next step.
cristrod817
3 years agoExplorer | Level 3
I am following the exact example provided in The API Explorer.
https://dropbox.github.io/dropbox-api-v2-explorer/#sharing_get_shared_link_metadata
I can't provide a share link, I am expecting a share link from Dropbox. That purpose of this exercise, isn't it? Or am I missing something? Can you please provide an example? I am just following the example code provided by Dropbox.
Thank you for responding.
- cristrod8173 years agoExplorer | Level 3
This is the shared link I am expecting from my call to Dropbox.
https://www.dropbox.com/s/38czpuizzl9xxq1/Beach%20Vibes%20%28GO%29%206x8%20WEB.jpg?dl=0
So, I don't understand the error.
- Greg-DB3 years ago
Dropbox Staff
cristrod817 Здравко is correct; /2/sharing/get_shared_link_metadata is for getting information about an existing shared link that you would specify. It isn't a way to create or retrieve a shared link. I see you were specifying a "url" parameter value of "https://api.dropboxapi.com/2/sharing/get_file_metadata", which is the Dropbox API endpoint, not a Dropbox shared link. You can find information about Dropbox shared links here.
To create a shared link using the API, you would instead use /2/sharing/create_shared_link_with_settings. To list existing shared links, you would use /2/sharing/list_shared_links.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,994 PostsLatest Activity: 2 hours ago
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 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!