Skip to main content
Box Employee
May 21, 2025 12:48 PM UTC
Question

Can sharedLink be returned on uploadFile response?

Hello,

 

I'm uploading a file without problems with uploadFile method, but the response sets sharedLink to null.

You can see the example here (https://developer.box.com/v2.0/reference#upload-a-file)

 

Can uploadFile method return sharedLink automatically or do I need to call createSharedLink when I need it?

 

Thanks

    2 replies

    Box Employee
    May 21, 2025 12:49 PM UTC

     This requires two API calls. As you mentioned, you have to upload a file, and then call the Create Shared Link endpoint to create a shared link for that file. Check out the example here.

    Translate
    Box Employee
    May 21, 2025 12:49 PM UTC

    any reason to return sharedLink in the uploadFile result if it's always null?

    Translate