cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Show Image from get_temporary_link in Apps.

Explorer | Level 3

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"
}

 

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Show Image from get_temporary_link in Apps.

Dropboxer
Dropboxer
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_...

That can be modified for different use cases as shown here:

https://www.dropbox.com/help/desktop-web/force-download

View solution in original post

2 Replies 2
Highlighted

Re: Show Image from get_temporary_link in Apps.

Dropboxer
Dropboxer
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_...

That can be modified for different use cases as shown here:

https://www.dropbox.com/help/desktop-web/force-download

View solution in original post

Highlighted

Re: Show Image from get_temporary_link in Apps.

Explorer | Level 3
Thank you for your solution. It was working.

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?