Skip to main content
Question

Issues with files/upload_sessions returning error 415 unsuppored media type

  • May 22, 2025
  • 7 replies
  • 39 views

Forum|alt.badge.img

Trying to upload a large file that does not exist on box yet and keep getting error 415 no matter what I change. Can anyone see what I messed up in this call?

 

POST https://upload.box.com/api/2.0/files/upload_sessions/
Authorization: Bearer <key removed>
User-Agent: libwww-perl/6.34

Content-Length: 85
Content-Type: application/json

{
"folder_id": "0",
"file_size": "2898786269",
"file_name": "test_log.zip"
}

 

Looking at the example this should work. Even if I have something wrong error code 415 Unsupported Media Type makes no sense here.... 

If I try and upload a new version of a existing file using files/fileID/upload_sessions everything works as expected. Just cannot get uploading new files to work. 

 

7 replies

Forum|alt.badge.img

Hello, 

Hmm this is a strange one. Are you able to provide me with your apps client ID? I'd be happy to take a look in our backend logs to get some more information about the error. 

Best,

Kourtney, Box Developer Advocate


Forum|alt.badge.img

Client ID is hqe9kbttqpusniwjmsawvb4nnw3n9wng

 

Going to try the curl example with my data today and see what return code I get there. If that works will investigate if perl user agent is formatting something weird on me. 


Forum|alt.badge.img

That's a great idea - let me know how it goes! 

I wasn't able to find a 415 in the last week based on that client ID. Are you able to provide a specific date/time/timezone of a 415 you received and/or a full body response that includes a request_id? 


Forum|alt.badge.img

It's the simple stuff that gets you... Had a extra / on the end of the URL. 

Removed that and it is now working as expected. 

Thanks again, 


Forum|alt.badge.img

So glad to hear you were able to find the issue! Thank you for the update. 


Forum|alt.badge.img

I was just having the exact same problem. The official documentation here lists a url with the trailing slash. Someone should fix that.


  • New Member
  • May 2, 2026

Contact box support. Its easy and they are fast paced