> ## Documentation Index
> Fetch the complete documentation index at: https://docs.drime.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Shareable Link

> Get the shareable link for an entry

## Overview

Retrieves the shareable link for a file or folder, if one exists.

## Path Parameters

<ParamField path="entryId" type="integer" required>
  ID or hash of the file entry
</ParamField>

## Response

<ResponseField name="link" type="object">
  The shareable link object

  <Expandable title="Link properties">
    <ResponseField name="id" type="integer">
      Link ID
    </ResponseField>

    <ResponseField name="hash" type="string">
      Unique hash for the shareable URL
    </ResponseField>

    <ResponseField name="password" type="string">
      Hashed password (if set)
    </ResponseField>

    <ResponseField name="expires_at" type="string">
      Expiration date (if set)
    </ResponseField>

    <ResponseField name="allow_edit" type="boolean">
      Whether editing is allowed
    </ResponseField>

    <ResponseField name="allow_download" type="boolean">
      Whether download is allowed
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="folderChildren" type="array">
  If the link is for a folder, lists immediate children
</ResponseField>

<ResponseField name="status" type="string">
  Request status (`success`)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET https://app.drime.cloud/api/v1/file-entries/123456/shareable-link \
    -H "Authorization: Bearer YOUR_ACCESS_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.drime.cloud/api/v1/file-entries/123456/shareable-link', {
    headers: {
      'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
    }
  });

  const { link } = await response.json();
  if (link) {
    const shareUrl = `https://app.drime.cloud/drive/shares/${link.hash}`;
    console.log('Share URL:', shareUrl);
  }
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://app.drime.cloud/api/v1/file-entries/123456/shareable-link',
      headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'}
  )

  link = response.json().get('link')
  if link:
      print(f"Share URL: https://app.drime.cloud/drive/shares/{link['hash']}")
  ```
</RequestExample>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "status": "success",
    "link": {
      "id": 789,
      "hash": "3h8N1nxZq7WtyRmXDIosFupSl9MCrD",
      "user_id": 15843,
      "entry_id": 123456,
      "expires_at": null,
      "allow_edit": false,
      "allow_download": true
    },
    "folderChildren": []
  }
  ```

  ```json 404 - Not Found theme={null}
  {
    "message": "Shareable link not found"
  }
  ```
</ResponseExample>
