Overview

Classes

  • Dropbox\AccessToken
  • Dropbox\AccessType
  • Dropbox\AppInfo
  • Dropbox\AuthInfo
  • Dropbox\Client
  • Dropbox\Config
  • Dropbox\Path
  • Dropbox\RequestToken
  • Dropbox\Token
  • Dropbox\WebAuth
  • Dropbox\WriteMode

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_ProtocolError
  • Dropbox\Exception_RetryLater
  • Dropbox\Exception_ServerError
  • Overview
  • Class
  • Tree

Class AccessToken

This token is embedded in every API request so that the Dropbox server knows the request is authorized. Each access token is associated with a specific application, so the Dropbox server knows which application is making requests.

Do not share any of your access tokens with anybody, or they will be able to make API requests pretending to be your application.

You get an access token from Dropbox\WebAuth::finish().

Storing Access Tokens

Once you have an access token, they are valid for many years and so you'll typically store it somewhere long-lived, like a database or a file.

You can convert this object into a single string using Dropbox\AccessToken::serialize(), and use AccessToken::parse() to convert that string back into an object.

Dropbox\Token
Extended by Dropbox\AccessToken
Final
Namespace: Dropbox
Located at Dropbox/AccessToken.php
Methods summary
public string
# serialize( )

Returns a string representation of this access token. Can be convenient when storing the access token to a file or database.

Returns a string representation of this access token. Can be convenient when storing the access token to a file or database.

Returns

string
public static Dropbox\AccessToken
# deserialize( string $data )

Convert a string generated by Dropbox\AccessToken::serialize() back into a Dropbox\AccessToken object.

Convert a string generated by Dropbox\AccessToken::serialize() back into a Dropbox\AccessToken object.

Parameters

$data
string
$data

Returns

Dropbox\AccessToken

Throws

Dropbox\DeserializeException
Methods inherited from Dropbox\Token
__toString(), matchesKey()
Dropbox SDK for PHP API documentation generated by ApiGen 2.8.0