Overview

Classes

  • Dropbox\AppInfo
  • Dropbox\ArrayEntryStore
  • Dropbox\AuthBase
  • Dropbox\AuthInfo
  • Dropbox\Client
  • Dropbox\OAuth1AccessToken
  • Dropbox\OAuth1Upgrader
  • Dropbox\Path
  • Dropbox\RootCertificates
  • Dropbox\Security
  • Dropbox\SSLTester
  • Dropbox\Util
  • Dropbox\WebAuth
  • Dropbox\WebAuthBase
  • Dropbox\WebAuthNoRedirect
  • Dropbox\WriteMode

Interfaces

  • Dropbox\ValueStore

Exceptions

  • Dropbox\AppInfoLoadException
  • Dropbox\AuthInfoLoadException
  • Dropbox\DeserializeException
  • Dropbox\Exception
  • Dropbox\Exception_BadRequest
  • Dropbox\Exception_BadResponse
  • Dropbox\Exception_BadResponseCode
  • Dropbox\Exception_InvalidAccessToken
  • Dropbox\Exception_NetworkIO
  • Dropbox\Exception_OverQuota
  • Dropbox\Exception_ProtocolError
  • Dropbox\Exception_RetryLater
  • Dropbox\Exception_ServerError
  • Dropbox\HostLoadException
  • Dropbox\StreamReadException
  • Dropbox\WebAuthException_BadRequest
  • Dropbox\WebAuthException_BadState
  • Dropbox\WebAuthException_Csrf
  • Dropbox\WebAuthException_NotApproved
  • Dropbox\WebAuthException_Provider
  • Overview
  • Class

Class OAuth1Upgrader

Lets you convert OAuth 1 access tokens to OAuth 2 access tokens. First call OAuth1AccessTokenUpgrader::createOAuth2AccessToken() to get an OAuth 2 access token. If that succeeds, call OAuth1AccessTokenUpgrader::disableOAuth1AccessToken() to disable the OAuth 1 access token.

use \Dropbox as dbx;
$appInfo = dbx\AppInfo::loadFromJsonFile(...);
$clientIdentifier = "my-app/1.0";
$oauth1AccessToken = dbx\OAuth1AccessToken(...);

$upgrader = new dbx\OAuth1AccessTokenUpgrader($appInfo, $clientIdentifier, ...);
$oauth2AccessToken = $upgrader->getOAuth2AccessToken($oauth1AccessToken);
$upgrader->disableOAuth1AccessToken($oauth1AccessToken);
Dropbox\AuthBase
Extended by Dropbox\OAuth1Upgrader
Namespace: Dropbox
Located at Dropbox/OAuth1Upgrader.php
Methods summary
public string
# createOAuth2AccessToken( Dropbox\OAuth1AccessToken $oauth1AccessToken )

Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2 access token that represents the same user and app.

Given an existing active OAuth 1 access token, make a Dropbox API call to get a new OAuth 2 access token that represents the same user and app.

See /oauth2/token_from_oauth1.

Parameters

$oauth1AccessToken

Returns

string
The OAuth 2 access token.

Throws

Dropbox\Exception
public
# disableOAuth1AccessToken( Dropbox\OAuth1AccessToken $oauth1AccessToken )

Make a Dropbox API call to disable the given OAuth 1 access token.

Make a Dropbox API call to disable the given OAuth 1 access token.

See /disable_access_token.

Parameters

$oauth1AccessToken

Throws

Dropbox\Exception
Methods inherited from Dropbox\AuthBase
__construct(), getAppInfo(), getClientIdentifier(), getUserLocale()
Dropbox SDK for PHP API documentation generated by ApiGen