Unshared_at returning invalid_parameter with 400

Hi Team,

We are trying to set the unshared_at value to update the publicly shared folder to be accessible for 10 minutes only, with this endpoint, https://developer.box.com/reference/put-folders-id/#param-shared_link-unshared_at

We do have a paid account

However we are getting the below response :

    "reason": "invalid_parameter",
    "name": "unshared_at",
    "message": "Invalid value '1712055223'."

Could anyone help with this error

I didn’t see an example of the value that you are sending for the “unshared_at” field, but it could be that your value isn’t compatible with the RFC3339 date/time format (RFC 3339 - Date and Time on the Internet: Timestamps).

Here’s an example request body that uses an RFC3339 compatible date/time format (with a time-offset)

    "shared_link": {
        "access": "open",

And an example using RFC3339 compatible Z notation

    "shared_link": {
        "access": "open",

Currently we are already sending the request in this format. However we are still getting the error.

Some other reasons (that I can think of) for this error:

  1. The date/time provided is not a future date/time.
  2. The owner of the folder being modified is not a paid account user.
  3. The Enterprise of the folder owner is configured to block the modification of the shared link expiration.

You mentioned that you are trying to set the expiration to be 10 minutes into the future, so the first reason doesn’t sound like the issue. You could probably confirm this by comparing the returned invalid unix time (the value that replaces the “1712055223” from your example) with the current time.

You also mentioned that you have a paid account, so unless you are issuing the request on a folder that was collabed in by a free user account, the second reason seems unlikely.

For the third item, the Enterprise Admin can set a configuration to disable the modification of the expiration date.
The setting for this can be checked through the Admin Console via
(left panel)“Enterprise Settings”
=> (tab) “Content & Sharing”
=> (section) “Auto-Expiration”
=> (check box) “Allow item owners and editors to modify the expiration date”

This issue has been resolved after enabling this configuration. Thank you.