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

Automating Sending Email With Link to client files..

New member | Level 2
New member | Level 2

My business needs to email our clients and within the email provide a read only link to their file in Dropbox. I know the manual way to do the shared link, but we need a way to automate the process.

 

The way I want to automate it, would require a naming convention for the DropBox file that my code could know in advance. But when looking at how Dropbox names each file it appears they create uniqueid's.

 

Is there a way for me to do this? Thx in advance for any help!.

2 Accepted Solutions

Accepted Solutions
Highlighted

Re: Automating Sending Email With Link to client files..

Dropboxer
Dropboxer

To this using the Dropbox API, you can use /2/files/list_folder[/continue] to retrieve the metadata, including both path and id, for existing and new files in the connected Dropbox account.

 

You can then use to get a shared link /2/sharing/create_shared_link_with_settings. The API doesn't offer a way to have Dropbox send the email with the link itself, so you'd need to send the email from your app.

View solution in original post

Highlighted

Re: Automating Sending Email With Link to client files..

Dropboxer
Dropboxer
I'm not sure if I've understood your last questions properly, so please let me know if I've missed anything.

To make a call to a Dropbox API endpoint, such as /2/files/list_folder, you need an OAuth access token for the account you want to access. The Dropbox API v2 uses OAuth 2 in particular. You can find information on how this works here:

https://www.dropbox.com/developers/reference/oauth-guide

In short, you need to log in (or already be logged in) to the Dropbox web site once to first authorize the app to access your account. From there, you get an access token that you can store and re-use for API calls, without going through that app authorization process again.

Also, here's a basic example of making an API call in PHP using curl:

https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folde...

Alternatively, you can use a third party library:

https://www.dropbox.com/developers/documentation/communitysdks

View solution in original post

5 Replies 5
Highlighted

Re: Automating Sending Email With Link to client files..

Dropboxer
Dropboxer

To this using the Dropbox API, you can use /2/files/list_folder[/continue] to retrieve the metadata, including both path and id, for existing and new files in the connected Dropbox account.

 

You can then use to get a shared link /2/sharing/create_shared_link_with_settings. The API doesn't offer a way to have Dropbox send the email with the link itself, so you'd need to send the email from your app.

View solution in original post

Highlighted

Re: Automating Sending Email With Link to client files..

New member | Level 2
New member | Level 2

Greg, thank you so much for the info.

 

So what I am hoping I can now do is use PHP to call curl that will point me to my DropBox root folder.  Using /2/files/list_folder[/continue

request, I will get back all the folder names and files within those folders, loop through each returned file and using the meta data create a link with the proper URL to get me back to the client's corresponding file.

 

So with all this info contained in the URL, I shouldn't have any authentication issues from trying to access via email instead of actually logging into DROPBOX? It assumes that if i hav all the required Id info that logging into DropBox is not necessary?

 

Thanks again!

Jim

 

 

 

Highlighted

Re: Automating Sending Email With Link to client files..

Dropboxer
Dropboxer
I'm not sure if I've understood your last questions properly, so please let me know if I've missed anything.

To make a call to a Dropbox API endpoint, such as /2/files/list_folder, you need an OAuth access token for the account you want to access. The Dropbox API v2 uses OAuth 2 in particular. You can find information on how this works here:

https://www.dropbox.com/developers/reference/oauth-guide

In short, you need to log in (or already be logged in) to the Dropbox web site once to first authorize the app to access your account. From there, you get an access token that you can store and re-use for API calls, without going through that app authorization process again.

Also, here's a basic example of making an API call in PHP using curl:

https://stackoverflow.com/documentation/dropbox-api/412/listing-a-folder/1370/listing-the-root-folde...

Alternatively, you can use a third party library:

https://www.dropbox.com/developers/documentation/communitysdks

View solution in original post

Highlighted

Re: Automating Sending Email With Link to client files..

New member | Level 2
New member | Level 2

Greg, can't thank you enough!... This is all I need (I think). I appreciate all your help.

 

-Jim

Highlighted

Re: Automating Sending Email With Link to client files..

New member | Level 2
New member | Level 2

Hey Jimmy, 

Collectizi does that. You can automate your clients files collection, approve them, track completion and share the requests with your team if needed.

And you don't need to do emails anymore

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?