Skip to main content
Question

405 Error On File Upload API Call

  • May 22, 2025
  • 5 replies
  • 37 views

Forum|alt.badge.img

I'm migrating files from box view version 1 to the new api. That means I'm iterating over all my files and uploading them to the new api. I am able to successfully upload a lot of files but then on some files I get a 405 Method Not Allowed Error. The files that succeed use the exact same code/API token as the ones that are failing. Here's some more info:

I'm doing a POST to https://upload.box.com/api/2.0/files/content. It's a multipart body request. The first part of the body are the attributes:

{"name":"name_of_file", "parent":{"id":"0"}}

The second part of the body is the file itself. 

5 replies

Forum|alt.badge.img

Hi , thanks for writing to our forums! I'm excited to hear you're moving over to our New View API!

 

Since most of your files are working, what you're seeing is probably a little more transient. If you simply retry those files again, do the issues persist or go away?

 

I'm inclined to say what you're seeing is not expected. If it's not too much trouble, could you please open up a support ticket with us (use Contact Support in the top menu bar of this page)? We'll want to collect some more specific details about your application (maybe not appropriate for this forum) to see exactly what's going on.

 

Thanks!

Jason


Forum|alt.badge.img

Thanks for the response! I submitted a ticket. Note that as the jan 15 EOL date approaches this issue increases in severity. Thanks for the help.


Forum|alt.badge.img

Hello,
I have the same issue.

Are there any updates on that issue?

Thanks and Best,

Dimitri


Forum|alt.badge.img

Hey  and ,

 

While working on a support case for one of our enterprise customers, we discovered a possible root cause for this issue (by accident). It's possible that the content type you are sending is not multipart/form-data. Instead, we've seen that an application/x-www-form-urlencoded content-type will reproduce this 405 error.

 

You can verify whether your application is sending the correct content-type by making your API call to https://httpbin.org/anything instead of api.box.com, which will echo the details of your API call. Even if it's not the content-type error, you could compare your code's API call with a successful call via Postman to see what the difference might be.

 

Hope that helps!

 

Thanks,

Jason


Forum|alt.badge.img

I am also facing same with 405 erro method not allowed
i tried content type with both "application/x-www-form-urlencode" and "multipart/form-data" 
but still i am facing same issue please can you help me for this asap.