Skip to main content
Question

400 Error when request header contains empty name value pairs.

  • May 27, 2025
  • 1 reply
  • 8 views

Forum|alt.badge.img

Initially when request header contains empty name value pair the rest api was working fine, recently api is throwing 400 bad request error.

We want to know whether Box API has added any latest changes on header validation. We did not find any documentation on such changes, this seems to be unexpected change. Can we get an update on what is modified at Box API end so that we can handle accordingly.

Example- Create Folder API with Post: https://api.box.com/2.0/folders, header: {"name":"","value":""}, Body: { "name" : "test-temp1", "parent" : {"id": "0"} }

1 reply

Forum|alt.badge.img
  • Author
  • Known Participant
  • 34746 replies
  • May 27, 2025

Hi! 

It looks like a box support agent responded the below - which is correct. I will post for other users to see. 

Unless explicitly stated in our Create folder API endpoint, there should be no additional headers included in the API request. While including additional API request headers or request parameters MAY work we cannot guarantee the API request will succeed. From the Create folder API endpoint there is no documentation regarding including additional headers. Therefore, we have started to tighten the headers and request parameters we have accepted for our API endpoints. Including an empty header will now not work and we require you do not include empty headers in further API requests.

Thanks, 

Alex, Box Developer Advocate