create_shared_link
Create a public shareable link for an album to allow external viewing without authentication. Optionally enable download and metadata display.
Instructions
Create a public shared link for an album, making it accessible via URL without authentication. Use this to publish a gallery for external viewing. Side effect: creates a publicly accessible URL.
Args:
album_id: The album UUID to share publicly.
allow_download: Allow visitors to download original files (default true).
show_metadata: Show EXIF data to visitors (default true).
description: Optional human-readable description for the link.
Returns: JSON with link id, key, album_id, and the full shareable URL.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| album_id | Yes | ||
| allow_download | No | ||
| show_metadata | No | ||
| description | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- scripts/create_shared_links.py:43-59 (helper)Standalone script version of create_shared_link (synchronous, using requests). This is a utility script, not part of the MCP server.
def create_shared_link(album_id, album_name): """Create a shared link for an album.""" url = f"{BASE_URL}/api/shared-links" data = { "type": "ALBUM", "albumId": album_id, "allowDownload": True, "showMetadata": True, "allowUpload": False, } resp = requests.post(url, headers=HEADERS, json=data) resp.raise_for_status() result = resp.json() key = result.get("key", "") share_url = f"{BASE_URL}/share/{key}" print(f" Shared: {album_name} → {share_url}") return result