Add the power of the Box AI API to your custom apps at Content Cloud Summit on May 15

Learn more and register!

Get shared link for web link

get
https://api.box.com/2.0
/web_links/:web_link_id

Gets the information for a shared link on a web link.

Request

bearer [ACCESS_TOKEN]
application/json

Path Parameters

Query Parameters

stringin queryrequired
shared_link

Explicitly request the shared_link fields to be returned for this item.

Response

application/jsonWeb link

Returns the base representation of a web link with the additional shared link information.

application/jsonClient error

Returned when the access token provided in the Authorization header is not recognized or not provided.

application/jsonClient error

Returned if the file is not found, or the user does not have access to the file.

application/jsonClient error

Returned if the file_id is not in a recognized format.

application/jsonClient error

An unexpected client error.

get
Get shared link for web link
You can now try out some of our APIs live, right here in the documentation.
Log in

Request Example

cURL
curl -i -X GET "https://api.box.com/2.0/web_links/32423234?fields=shared_link" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Python
shared_link = client.web_link('12345').get().shared_link
url = shared_link['url']

Response Example

{
  "id": "12345",
  "type": "web_link",
  "etag": "1",
  "shared_link": {
    "url": "https://app.box.com/s/kwio6b4ovt1264rnfbyqo1",
    "download_url": "https://app.box.com/shared/static/kwio6b4ovt1264rnfbyqo1.pdf",
    "vanity_url": null,
    "vanity_name": null,
    "effective_access": "open",
    "effective_permission": "can_download",
    "is_password_enabled": false,
    "unshared_at": "2020-09-21T10:34:41-07:00",
    "download_count": 0,
    "preview_count": 0,
    "access": "open",
    "permissions": {
      "can_preview": true,
      "can_download": true,
      "can_edit": false
    }
  }
}