https://github.com/codeadamca/php-dropbox-api
A basic example of uploading a file to your Dropbox account.
https://github.com/codeadamca/php-dropbox-api
api dropbox php
Last synced: about 2 months ago
JSON representation
A basic example of uploading a file to your Dropbox account.
- Host: GitHub
- URL: https://github.com/codeadamca/php-dropbox-api
- Owner: codeadamca
- Created: 2022-09-09T18:24:26.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-04T17:41:41.000Z (4 months ago)
- Last Synced: 2025-03-31T07:18:24.735Z (3 months ago)
- Topics: api, dropbox, php
- Language: PHP
- Homepage:
- Size: 117 KB
- Stars: 1
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Uploading a File to Dropbox Using PHP
A basic example of uploading a file to your Dropbox account using vanilla PHP and a generated access token.
To make this upload scripte work just follow these setps:
1. Login to your Dropbox account and go to the [Dropbox developers portal](https://www.dropbox.com/developers/).
2. Click on ```App Console```.
3. Create a new app or use an existing app. Make sure the app has ```files.content.write``` checked in the ```Permissions``` tab.
4. On the ```Settings``` tab generate an Access Token. Place the Access Token in the ```.env``` file.
5. Test the upload script.
> [!Note]
> The root folder ID must be kept current. If the upload is not working use the `/get_authenticated_admin` to retrieve an updated folder ID.This cose sample uses a ```.env``` files as described on the [php-env](https://github.com/codeadamca/php-env) repo.
***
## Repo Resources
* [Visual Studio Code](https://code.visualstudio.com/)
* [PHP](https://www.php.net/)
* [Dropbox](https://www.dropbox.com/)