1. Go to this page and download the library: Download spatie/dropbox-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
spatie / dropbox-api example snippets
$client = new Spatie\Dropbox\Client($authorizationToken);
//create a folder
$client->createFolder($path);
//list a folder
$client->listFolder($path);
//get a temporary link
$client->getTemporaryLink($path);
$client = new Spatie\Dropbox\Client($authorizationToken);
// implements Spatie\Dropbox\TokenProvider
$tokenProvider = new AutoRefreshingDropBoxTokenService($refreshToken);
$client = new Spatie\Dropbox\Client($tokenProvider);
$client = new Spatie\Dropbox\Client([$appKey, $appSecret]);
$from = '/dropboxpath/somefile.txt';
$to = '/dropboxpath/archive/somefile.txt';
$client->move($from, $to, $autorename=true);
// with autorename results in 'somefile (1).txt'
public function contentEndpointRequest(string $endpoint, array $arguments, $body): ResponseInterface
public function rpcEndpointRequest(string $endpoint, array $parameters): array