Skip to main content

Setting a non-private custom URL using BOX API

  • February 26, 2024
  • 2 replies
  • 132 views

Is it possible to configure the non-private custom URL in Shared Link Settings using the BOX API? I want to automate the process of linking files from local storage to BOX and setting a non-private custom URL using the BOX API. Since I couldn’t find information in the API reference, I would appreciate your guidance.

2 replies

rbarbosa Box
  • Developer Advocate
  • 553 replies
  • February 26, 2024

Hi @user193 , welcome to the forum.


It should be possible using the vanity name.


Something like this:


curl --location --request PUT 'https://api.box.com/2.0/files/1147571642464?fields=shared_link' \

--header 'Content-Type: application/json' \

--header 'Authorization: Bearer 1!lf...oLw.' \

--data '{

  "shared_link": {

    "access": "open",

    "vanity_name": "about_box_platform",

    "permissions": {

      "can_download": true,

      "can_preview": true,

      "can_edit": true

    }

  }

}'


This requires that the enterprise administrator enables this feature in the admin console:



Let us know if this helps.


Best regards


Rui


  • Author
  • New Participant
  • 1 reply
  • March 5, 2024

Thank you for your polite reply. It’s good to know that the Enterprise version can handle it. This is very helpful information.


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