Auto create shared links

新規投稿

コメント

3件のコメント

  • France

    Hi there, 

    Welcome to the Box Community!

    Unfortunately, we don't currently offer the feature you asked to auto create shared links for documents in Box, you will have to manually create or enable them as stated in this article: 

    If this is something you would like to be able to do, I would highly recommend submitting this feature request at pulse.box.com! Our product managers review these requests and take them into consideration for future product development.

    Best,

    0
    コメントアクション パーマリンク
  • David Jo

    Hi there, just to follow up on this. I built an internal company tool that can auto-generate PDF documents and upload them into a box folder and some of these files will be shared with external users. So when I upload any document via the API, do I have to run a second API to enable sharing of that document I just uploaded? In other words: step 1 - upload using the /files/content/ endpoint, and then step 2 - share using the /files/:file_id?fields=shared_link endpoint with a PUT verb?

     

    In/files/content/files/contentIn the API example for the upload (https://developer.box.com/reference/post-files-content/), there is a sample response that includes the shared_link section. I looked through the attributes description but there is no reference to creating a shared link at the same time when uploading the file.

    I thought maybe something like the following would work in the attributes request body:

    {
    "name": "Sample_Doc.pdf",
    "parent": {
    "id": "123456789012"
    },
    "content_created_at": "2023-02-19T10:53:43-08:00",
    "content_modified_at": "2023-02-19T10:53:43-08:00"
    },
    "shared_link": {}

    But that only caused a 400 Bad Request error or did not result in anything in the shared_link object. The "shared_link": {} syntax can be used in my referenced step #2 above to just use all the defaults. I did try a few variations on the above.

    David

    0
    コメントアクション パーマリンク
  • Paride Paffarini

    I have exactly the same problem.

    Looking at the "upload file" api this seems to be possible because in the sample response the "shared_link" section is populated with the link.

    So, I'd expect a way to enable the have the shared link enable when uploading the file in order to get it in the response. 

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。