We’re Still Here to Help (Even Over the Holidays!) - find out more here.
Forum Discussion
phyopwint
8 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
2 Replies
- Greg-DB8 years ago
Dropbox Community Moderator
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 - phyopwint8 years agoExplorer | Level 3Thank you for your solution. It was working.
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!