You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
phyopwint
7 years agoExplorer | Level 3
Show Image from get_temporary_link in Apps.
I have specific dropbox folder that will include only one image at all time. My app needs to get this dropbox image and show this image in image element. Whenever dropbox image change, my app needs to reflect this updated image.
I tried to get image using "files_get_temporary_link" API. I've got this json return. when I tried to paste "link" at address bar Ive got 404 error. Could someone tell me what I did wrong. Thank you.
Thank you so much.
{ "metadata": { "name": "wallpaper.jpg", "path_lower": "/wallpaper.jpg", "path_display": "/wallpaper.jpg", "id": "id:s6F_A8pbzgAAAAAAAAAALg", "client_modified": "2018-07-17T08:57:12Z", "server_modified": "2018-07-17T08:57:24Z", "rev": "4d32bebe0", "size": 155060, "content_hash": "0746b8ba94f9672c23845080a01ab613445c5836aed3f445cecb09e7b68a3f71" }, "link": "https://dl.dropboxusercontent.com/apitl/1/AABwcyhWG1ttuYxiN5s5OIYgaqAS86YBnRiQxpzjYNlFEGQhx38LtDIogy6c1wXjGUMVbAmHeSXx_P7bDfWt3-hVTHTBCKBbD-A-SHj0TTQEjEAW3Q8nrN-U-4OsghVsvFUhdMPeV7BCU5fiC_UC2VgrDyjMIV_Ve1072mPEJdR3tTqK-UqFytiHjcolGTapwVJtd0bGUHwNPpYrV0qJas5BZuBDICfs859JQWRBkluMi3dHUHmfFbtV4cgqNnvVomFPG8Gwpm36QQH6MkD_0xGmy-R9BYVXYd46sk3mdpX1Eg" }
- These links do expire after four hours. If you attempt to access an expired link, it will fail.
To be clear though, are you saying the returned link fails less than four hours after it was retrieved?
In general though, if you need to access file data, you should use /2/files/download. It returns the image data directly:
https://www.dropbox.com/developers/documentation/http/documentation#files-download
Or, if you need a long-lived link, you can use /2/sharing/create_shared_link_with_settings:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
That can be modified for different use cases as shown here:
https://www.dropbox.com/help/desktop-web/force-download
- Greg-DBDropbox StaffThese links do expire after four hours. If you attempt to access an expired link, it will fail.
To be clear though, are you saying the returned link fails less than four hours after it was retrieved?
In general though, if you need to access file data, you should use /2/files/download. It returns the image data directly:
https://www.dropbox.com/developers/documentation/http/documentation#files-download
Or, if you need a long-lived link, you can use /2/sharing/create_shared_link_with_settings:
https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_settings
That can be modified for different use cases as shown here:
https://www.dropbox.com/help/desktop-web/force-download- phyopwintExplorer | Level 3Thank you for your solution. It was working.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,889 PostsLatest Activity: 6 hours agoIf 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!