vursmallbusiness.blogg.se

Dropbox api v2 documentation
Dropbox api v2 documentation








dropbox api v2 documentation

$tokenProvider = new AutoRefreshingDropBoxTokenService($refreshToken) implements Spatie\Dropbox\TokenProvider (Dropbox announced they will be moving to short-lived access_tokens in 2021). If you use oauth2 to authenticate and to acquire refresh-tokens and access-tokens, (like thephpleague/oauth2-client), you can create an adapter that internally takes care of token-expiration and refreshing tokens, and at runtime will supply the access-token via the TokenProvider->getToken(): string method. Or alternatively, you can implement Spatie\Dropbox\TokenProvider which will provide the access-token from its TokenProvider->getToken(): string method. $client = new Spatie\Dropbox\Client($authorizationToken) With an authorization token you can instantiate a Spatie\Dropbox\Client. You'll find more info at the Dropbox Developer Blog. You can just generate a token in the App Console for any Dropbox API app. Unlike other companies, Dropbox has made this very easy. The first thing you need to do is get an authorization token at Dropbox. You can install the package via composer by running this command: composer require spatie/dropbox-api It contains only the methods needed for our flysystem-dropbox adapter. It is a minimal PHP implementation of the Dropbox API v2. Spatie comes up with a very handy package called Dropbox-API.










Dropbox api v2 documentation