Skip to main content
Solved

Unshared_at returning invalid_parameter with 400


  • New Participant
  • 2 replies

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

Best answer by user62 Box

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”

View original
Did this topic help you find an answer to your question?

4 replies

  • Participating Frequently
  • 18 replies
  • April 3, 2024

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",

        "unshared_at":"2024-04-05T10:53:43-05:00"

    }

}


And an example using RFC3339 compatible Z notation


{

    "shared_link": {

        "access": "open",

        "unshared_at":"2024-05-15T00:00:00Z"

    }

}


  • Author
  • New Participant
  • 2 replies
  • April 4, 2024

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


  • Participating Frequently
  • 18 replies
  • Answer
  • April 8, 2024

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”


  • Author
  • New Participant
  • 2 replies
  • April 16, 2024

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings