Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
Informatica P.
10 years agoNew member | Level 1
Is posible upload file whit PHP and get public share link to file?
Hello,
I want upload a file whit API PHP. But i want get the public link share to my users download the file from their home.
Is posible?
Greg-DB
Dropbox Community Moderator
10 years agoDropbox does offer an API that enables programmatic listing, uploading, downloading, and sharing of files, so this is possible. You can find everything you need to get started with the Dropbox API, including documentation, tutorials, and SDKs here. You'll need to register an app here.
App authorization is processed using OAuth. You can find more information about using OAuth in our OAuth guide.
We don't currently have an official PHP SDK for Dropbox API v2, so if you're using PHP, you can call the API v2 endpoints directly.
To upload a file, you can use the /files/upload endpoint. To get a shared link, you can use the /sharing/create_shared_link_with_settings endpoint.
Or you can use the official PHP SDK for Dropbox API v1:
https://www.dropbox.com/developers-v1/core/sdks/php
https://www.dropbox.com/developers-v1/core/start/php
https://dropbox.github.io/dropbox-sdk-php/api-docs/v1.1.x/
In that SDK, you can upload files using the getFile method, and share them using the createShareableLink method.
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!