Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7815241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T05:27:53+00:00 2026-06-02T05:27:53+00:00

I am trying to upload file using dropbox api but following Code shows some

  • 0

I am trying to upload file using dropbox api but following Code shows some errors as:

bootstrap.php

// Register a simple autoload function
spl_autoload_register(function($class){
    $class = str_replace('\\', '/', $class);
    require_once('../' . $class . '.php');
});

// Set your consumer key, secret and callback URL
$key      = 'XXXXXXXXXXXXX';
$secret   = 'XXXXXXXXXXXXX';

// Check whether to use HTTPS and set the callback URL
$protocol = (!empty($_SERVER['HTTPS'])) ? 'https' : 'http';
$callback = $protocol . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];

// Instantiate the required Dropbox objects
$encrypter = new \Dropbox\OAuth\Storage\Encrypter('XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX');
$storage = new \Dropbox\OAuth\Storage\Session($encrypter);
$OAuth = new \Dropbox\OAuth\Consumer\Curl($key, $secret, $storage, $callback);
$dropbox = new \Dropbox\API($OAuth);

putFile.php

// Require the bootstrap
require_once('bootstrap.php');

// Create a temporary file and write some data to it
$tmp = tempnam('/tmp', 'dropbox');
$data = 'This file was uploaded using the Dropbox API!';
file_put_contents($tmp, $data);

// Upload the file with an alternative filename
$put = $dropbox->putFile($tmp, 'api_upload_test.txt');

// Unlink the temporary file
unlink($tmp);

// Dump the output
var_dump($put);

Code By: BenTheDesigner-Dropbox

Error:
Fatal error: Uncaught exception ‘Dropbox\Exception’ with message ‘App folder (sandbox) access attempt failed because this app is not configured to have an app folder. Should your access type be ‘dropbox’ instead? (Status Code: 403)’ in C:\wamp\www\BenTheDesigner-Dropbox-b49576c\Dropbox\OAuth\Consumer\Curl.php on line 103

( ! ) Dropbox\Exception: App folder (sandbox) access attempt failed because this app is not configured to have an app folder. Should your access type be ‘dropbox’ instead? (Status Code: 403) in C:\wamp\www\BenTheDesigner-Dropbox-b49576c\Dropbox\OAuth\Consumer\Curl.php on line 103

i have no idea what to do?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T05:27:54+00:00Added an answer on June 2, 2026 at 5:27 am

    There are two kinds of “access type” you can currently register a Dropbox API app for, “app folder” (a.k.a. sandbox) and “full Dropbox” (a.k.a. dropbox). You make this choice when you register the app. Afterwards, you can see which type you have on your app’s options page. You can find a link to your app’s options page here:
    https://www.dropbox.com/developers/apps

    In your code, you need to set your “root” (usually set in the same place as your keys) to reflect the correct access type.

    This error means that your app is registered for full Dropbox access, but you’ve set app folder in your code instead.

    To fix this, find where your root is set and switch it to ‘dropbox’. (Alternatively, if you do want to use app folder access, register a new app with app folder access and use those keys.)

    It looks like the library you’re using has a function “setRoot” in the API class you should use:
    https://github.com/BenTheDesigner/Dropbox/blob/master/Dropbox/API.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to upload a pdf file using webservice api. But this api
friends, i am trying to upload file to php server using following tutorial http://getablogger.blogspot.com/2008/01/android-how-to-post-file-to-php-server.html
I am trying to upload file to rackspace cloud file using the following code:
I am trying to upload a file using the HTML File Api but I
I was trying to upload file(s) using PrototypeJs request method but I failed. The
I am trying to upload files via FTP using the following script. The file
I'm trying to upload an edited version of a .txt file to Dropbox using
I am trying to upload a file using php,and i need to pass a
I'm trying to upload PHP file via php using ftp details as mentioned below.
I am trying to upload file on HTTP server using POST but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.