Skip to main content
Question

Get Share Link or Create Share Link throw 404 error

  • May 22, 2025
  • 4 replies
  • 55 views

Forum|alt.badge.img

When I user Box API to get share link or create Share Link, Box throw new error 404 not found. I don't know I need to settings or config in folder or not? 

https://api.box.com/2.0/:endpoint/:id?fields=shared_link GET

https://api.box.com/2.0/:endpoint/:id?fields=shared_link PUT

I use this API with endpoint is files and file id.

Thank guys for watching!

 

4 replies

Forum|alt.badge.img

Hello, 

 

Thanks so much for using our Platform and Development Forum! 

 

I usually see people getting 404 errors for this when the user associated with their token is not a collaborator on the content they're trying to get the shared link for. 

 

If the user associated with your token is indeed a collaborator, please provide the full body error response you receive (including the request ID), so I can take a look on the backend for more details about your error! 

 

Best, 

Kourtney 


Forum|alt.badge.img

This is my error:

{
"type":"error"
"status":404
"code":"not_found"
"help_url":"http://developers.box.com/docs/#errors"
"message":"Not Found"
"request_id":"dknwb7fvh5yh3h9y"
}

I set access is "open" , password is "null" and download is "true" so I develop my website use access token. Thanks for supporting!


Forum|alt.badge.img

Hello, 

 

It looks like you're using the try it function on our developer website to do this. Could you please provide me with the file/folder ID you're passing? 

 

Best, 

Kourtney 


Forum|alt.badge.img

I'm having a similar issue; I have Python code working fine to set get_shared_link to either "open" or "company", but it throws the 404 when trying to set to "collaborators".

I'm able to run the API test using the same folder at https://developer.box.com/reference/put-folders-id--update-shared-link/, and can choose any of open, company, or collaborators, so it seems like I should have permissions to run it from my own python code (after making the OAuth connection):

item = client.folder(folder_id='138891053549').get()
url = item.get_shared_link(access='collaborators', allow_download=True)