One month down in 2025: How are your resolutions coming along? Check out how to get back on track here.
Forum Discussion
vibh
7 years agoExplorer | Level 3
API V2 Upload Limit
Hi,
I am trying to upload the file to Dropbox using API v2 in PHP using curl. I am getting a 413 error response from the Dropbox server (Request entity too large).
So what is the limit to upload the file to Dropbox and Please let me know there is any limit on the paid account?
- Greg-DB
Dropbox Staff
It sounds like you're using /2/files/upload. That endpoint does have a file size limit of 150 MB.
For larger files, you should use upload sessions instead.
This works the same way for both paid and free accounts.
- vibhExplorer | Level 3
Hi Greg,
Thanks for your response. please suggest how to use session with the curl in PHP.
An example of the same would be great because I am not able to implement it correctly after so many trials.
I changed my API URL: https://content.dropboxapi.com/2/files/upload_session/start
it gives "error in call to API function"
this is my header code
$headers = array('Authorization: Bearer ' . $token,
'Content-Type: application/octet-stream',
'Dropbox-API-Arg: ' .
json_encode(
array(
"path" => '/' . basename($destPath . $to_zip_folder),
"mode" => "add",
"autorename" => true,
"mute" => false
)
),
'Content-Type: application/octet-stream'
);Thanks in advance.
- Greg-DB
Dropbox Staff
I don't have a sample implementation for using upload sessions in PHP unfortunately.
Can you print out the full HTTP response body you're getting? It should contain a more detailed error message indicating the issue. If you still need help, please also share the code you have so far so I can take a look, in addition to the full error.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.5,947 PostsLatest Activity: 24 minutes ago
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!