Skip to main content
Question

400 Bad Request when adding collaborations via Box CLI

  • May 22, 2025
  • 2 replies
  • 56 views

Forum|alt.badge.img

I'm trying to create a new collaboration but I'm getting 404 Bad Request response via Box CLI (for both file and folder).

 

 

I tried using user-id and login but still the same error.

 

$> box folders:collaborations:add 8***phone number removed for privacy*** --user-id 283972101

Unexpected API Response [400 Bad Request | cjud83g55ejmvtym.0f4vddq5rno2koas60qh72imsjp] bad_request - Bad Request

 

Any thoughts on this?

2 replies

Forum|alt.badge.img

I think I found the problem: the role is not mandatory when using the CLI but if you don't pass that argument it will fail. I was able to successfully add the collaboration by informing the role


Forum|alt.badge.img

Does the expiration feature need to be enabled globally?

 

I'm trying to add expiration through the CLI and having no luck. We were getting `400 Bad Request` when we did not include role, but now with role added we're not getting anything. It just sits there.

 

box collaborations:update --as-user=USER_ID COLLABORATION_ID -r=viewer --expires-at="2019-12-10T12:35:29-08:00"