Dropbox icon indicating copy to clipboard operation
Dropbox copied to clipboard

Request token not found After allow OAuth.

Open thamaraiselvam opened this issue 9 years ago • 2 comments

Actually, I use this SDK on the self-hosted product, it works fine but some servers it creates following error after allowing OAuth from dropbox. (401) Request token not found

Could it server be a problem for this error ? attached stack trace

 Exception::__set_state(array(
   'message' => 'Request token not found.',
   'string' => '',
   'code' => 401,
   'file' => 'Dropbox/Dropbox/OAuth/Consumer/Curl.php',
   'line' => 144,
   'trace' => 
  array (
    0 => 
    array (
      'file' => 'Dropbox/Dropbox/OAuth/Consumer/ConsumerAbstract.php',
      'line' => 86,
      'function' => 'fetch',
      'class' => 'Dropbox_OAuth_Consumer_Curl',
      'type' => '->',
      'args' => 
      array (
        0 => 'POST',
        1 => 'https://api.dropbox.com/1/',
        2 => 'oauth/access_token',
      ),
    ),
    1 => 
    array (
      'file' => 'Classes/DropboxFacade.php',
      'line' => 65,
      'function' => 'getAccessToken',
      'class' => 'Dropbox_OAuth_Consumer_ConsumerAbstract',
      'type' => '->',
      'args' => 
      array (
      ),
    ),
    2 => 
    array (
      'file' => 'Classes/DropboxFacade.php',
      'line' => 42,
      'function' => 'init',
      'class' => 'DropboxFacade',
      'type' => '->',
      'args' => 
      array (
      ),
    ),
   'previous' => NULL,
))

thamaraiselvam avatar Jan 27 '17 09:01 thamaraiselvam

The updating latest version of OAuth/consumer/curl.php fixed the issue.

thamaraiselvam avatar Jan 27 '17 09:01 thamaraiselvam

It is recreating issue again, It happens often now.

  'url' => 'https://api.dropbox.com/1/oauth/access_token?oauth_consumer_key=xxx&oauth_signature_method=PLAINTEXT&oauth_token=xxx&oauth_version=1.0&oauth_signature=xxx%xxx',
  'postfields' => 
  array (
    'oauth_consumer_key' => 'xxx',
    'oauth_signature_method' => 'PLAINTEXT',
    'oauth_token' => 'xxx',
    'oauth_version' => '1.0',
    'oauth_signature' => 'xxx&xxx',
  ),
)

oauth_token is request token and oauth_signature is request_token_secret (after & symbol)

So my request token is empty here but still, I get (401) Request token not found

HTTP/1.1 401 Unauthorized
Server: nginx
Date: Fri, 27 Jan 2017 10:11:38 GMT
Content-Type: application/json
Content-Length: 70
Connection: keep-alive
User-Agent: 
Www-Authenticate: OAuth realm="https://api.dropbox.com/"
X-Dropbox-Request-Id: adc61bed1347ead824d541a7e7e836f2

thamaraiselvam avatar Jan 27 '17 10:01 thamaraiselvam