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

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted

Direct link to image file

Explorer | Level 3

Hi, I'd like to know if there is a way to create a direct link to a file using the API. My app requires sending an image link to a 3rd party's API for image recognition. When I test the link created using "create_shared_link_with_settings", I get something like 

www.dropbox.com/s/8um0tttqgbjq5c7/my_image.jpg  

But it is not recognised as an image. Thanks

1 Accepted Solution

Accepted Solutions
Highlighted

Re: Direct link to image file

Dropboxer
Dropboxer

Thanks for the link. Neat tool. I found a solution! 

The share/get_temporary_link is the one you want. You can test it out in the API explorer real quick to verify before you write the code. 

Cheers!

View solution in original post

5 Replies 5
Highlighted

Re: Direct link to image file

Dropboxer
Dropboxer

Hi, 

Is the 3rd party API you're calling expecting a file or a URL to an image? 

I'd expect it to need the entire file, in which case you'll need to download (files/download) the file onto your server and upload the file to the other API for processing. 

Highlighted

Re: Direct link to image file

Explorer | Level 3

Hi, thanks for the reply. The API is expecting a URL to the image. You can actually see for yourself here https://imagga.com/auto-tagging-demo

Links generated via the Dropbox API do not work as I assume the URL given is a 'container' with meta data, download links and comments etc. I am looking for a direct link to the media. Is this possible with Dropbox? Thanks

Highlighted

Re: Direct link to image file

Explorer | Level 3

To add some more information:

I created a link of an image and got something that looked like:
www.dropbox.com/s/8um0tttqgbjq5c7/my_image.jpg  

But after downloading the image to my desktop, the actual link to the image file looked like:https://uc16303a726d517a4932231f53ee.dl.dropboxusercontent.com/cd/0/get/AjqdFl9BQdUPdRx5SUC83nDAmmbl...

This form of URL works with the API in question. So my question is...is there a way to generate this URL?

Highlighted

Re: Direct link to image file

Dropboxer
Dropboxer

Thanks for the link. Neat tool. I found a solution! 

The share/get_temporary_link is the one you want. You can test it out in the API explorer real quick to verify before you write the code. 

Cheers!

View solution in original post

Highlighted

Re: Direct link to image file

Explorer | Level 3

Thanks Taylor, that seems to do the trick! I see temporary links expire after 4 hours but new ones can be generated on demand. Works fine for me.

Polls
Do you know how to organize your files and folders?
We have created a guide on folder best practice, so you can get organized now check it out here.

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?