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 RequestToken

A request token is used during the three-step OAuth web flow to identify the authorization session. Once authorization is complete and you have an access token, you don't need the request token anymore.

Storing Request Tokens

If you are doing the three-step OAuth web flow in a web application, it'll probably span two separate HTTP requests to your app. In the first request you'll call Dropbox\WebAuth::start() and get a request token. You need to store that request token somewhere (browser cookie, server-side session, database, etc.) so that you can pass it to Dropbox\WebAuth::finish() later.

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

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

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

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

Returns

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

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

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

Parameters

$data
string
$data

Returns

Dropbox\RequestToken

Throws

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