Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
@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.
Can you let me know where you found or received this code so I can check on that?
In any case, is this the actual/exact code you're running? When I plug in an access token, and add the missing "," in the 'headers' object that otherwise causes a SyntaxError, I actually get the different error "Error in call to API function "sharing/get_shared_link_metadata": request body: missing required field 'url'" which would be expected in this case for this code, as the /2/sharing/get_shared_link_metadata endpoint requires a 'url' parameter.
The code was found in Dropbox https://dropbox.github.io/dropbox-api-v2-explorer/#sharing_get_shared_link_metadata
Select View Request as Python Request (Requests Library)
and it gives this error:
{ "error_summary": "shared_link_not_found/", "error": { ".tag": "shared_link_not_found" } }
Please provide the appropriate code. Thank you. The path does exist. Check my prior replies.
@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.
Thanks for clarifying! That's correct, the /2/sharing/get_shared_link_metadata endpoint does require the 'url' parameter. That endpoint is a way to get information about a Dropbox shared link, so you need to include the Dropbox shared link in the call. The 'path' parameter can additionally be supplied to request information about a particular item relative to the folder, if the shared link itself is for a folder.
In my testing, the API v2 Explorer "Python request (requests library)" option for that endpoint is correctly including the 'url' parameter, and likewise I wasn't able to reproduce the original "request body is empty" error with this code, so it sounds like you were using a modified version of that code.
Anyway, it looks like you've got this sorted out now, but let us know if you need help with anything else.
Ok, I have updated the code to include the url parameter within the data = statement. Now I am getting the same error as the default code provided by Dropbox. I have included a print statement at the end of the code so I can see the response which is:
The code is identical to that
Here's my updated code:
@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.
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.
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.
Ha ha.. 😁 you are trying to evaluate an existing link, not to create a new link. 😉 If you want to create such link take a look here. 😉
Hope this helps.
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!