[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-storage\u002Fobjects\u002Fget":3,"docs-tabs-storage\u002Fobjects\u002Fget":6},{"content":4,"lastmod":5},"## Download object\n\n`GET \u002Fv1\u002Fstorage\u002Fobjects\u002F:key`\n\nReturns the object's content or a temporary download link. The query parameters determine the behavior: a redirect by default, or the content in the response body with `?inline=true`.\n\n## Parameters\n\n**Path**\n\n| Parameter | Type | Description |\n|----------|-----|---------|\n| `key` | string | Object key. The `\u002F` characters in the key must be encoded: `users%2F42%2Favatar.png` |\n\n**Query**\n\n| Parameter | Type | Default | Description |\n|----------|-----|-----------|---------|\n| `inline` | boolean | `false` | `true` or `1` — return the content directly in the response body (HTTP 200) instead of a redirect |\n| `inline_render` | boolean | `false` | Only together with `?inline=true`. `true` or `1` — removes the `Content-Disposition` header so the browser displays the file instead of downloading it |\n| `download` | string | — | File name. When following the link, the browser will prompt to save the file with the given name |\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl -L \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fstorage\u002Fobjects\u002Freports%2F2024%2Fannual.pdf\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\" \\\n  --output annual.pdf\n```\n\n### curl — OAuth application\n\n```bash\ncurl -L \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fstorage\u002Fobjects\u002Freports%2F2024%2Fannual.pdf\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\" \\\n  --output annual.pdf\n```\n\n### JavaScript — personal key\n\n```javascript\n\u002F\u002F Get a temporary link (without following the redirect)\nconst res = await fetch(\n  'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fstorage\u002Fobjects\u002Freports%2F2024%2Fannual.pdf',\n  {\n    redirect: 'manual',\n    headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n  }\n)\nconst url = res.headers.get('location') \u002F\u002F temporary link: 10 minutes requested, the signature may expire earlier\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch(\n  'https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fstorage\u002Fobjects\u002Freports%2F2024%2Fannual.pdf',\n  {\n    redirect: 'manual',\n    headers: {\n      'X-Api-Key': 'YOUR_APP_KEY',\n      'Authorization': 'Bearer USER_SESSION_TOKEN',\n    },\n  }\n)\nconst url = res.headers.get('location')\n```\n\n## Response fields\n\nThe response format depends on the query parameters.\n\n**Default — redirect**\n\nReturns `302 Found` with a temporary link in the `Location` header. The requested link lifetime is 10 minutes and the signature may expire earlier: follow it right away instead of storing it. Browsers follow the redirect automatically; in server-side code use `redirect: 'manual'` and read `response.headers.get('location')`.\n\n**`?inline=true` — content in the response body**\n\nReturns `200 OK` with the object's content directly in the response body. By default the browser saves the file (the `Content-Disposition: attachment` header). To have the browser display the file instead of downloading it, add `&inline_render=true`.\n\n**`?download=\u003Cname>` — download with a given name**\n\nReturns `302 Found`. When the client follows the link from the `Location` header, the storage serves the file with the `Content-Disposition: attachment; filename=\"\u003Cname>\"` header, so the browser prompts the user to save it under the given name.\n\n## Response example\n\nDefault — a redirect with no response body:\n\n```http\nHTTP\u002F1.1 302 Found\nLocation: \u003Ctemporary link>\nCache-Control: no-store\nContent-Length: 0\n```\n\n`?inline=true` — the object's content in the response body:\n\n```http\nHTTP\u002F1.1 200 OK\nContent-Type: application\u002Fpdf\nContent-Length: 303\nETag: \"dbaa5d4c5e4a709133830a8facd9fec8\"\nX-Content-Type-Options: nosniff\nContent-Disposition: attachment; filename=\"annual.pdf\"\n\n\u003Cobject content, 303 bytes>\n```\n\n`?download=annual-report.pdf` — a redirect with the file name carried in the link:\n\n```http\nHTTP\u002F1.1 302 Found\nLocation: \u003Ctemporary link with the file name annual-report.pdf>\nCache-Control: no-store\nContent-Length: 0\n```\n\n## Error response example\n\n404 — object not found:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"STORAGE_OBJECT_NOT_FOUND\",\n    \"message\": \"Object reports\u002F2024\u002Fannual.pdf not found\"\n  }\n}\n```\n\n## Errors\n\nThe method is limited to 600 requests per minute per Bitrix24 account. All API keys of\nthe account share this budget.\nThe current limit is returned in `x-ratelimit-limit`; after a `429`, retry\nafter the delay in `Retry-After`.\n\n| HTTP | Code | Description |\n|------|-----|---------|\n| 401 | `MISSING_API_KEY` | API key not passed |\n| 403 | `STORAGE_SCOPE_REQUIRED` | The API key has no `vibe:storage` scope |\n| 404 | `STORAGE_OBJECT_NOT_FOUND` | No object with the given key was found |\n| 410 | `STORAGE_OBJECT_DELETED` | The object was deleted |\n| 429 | `RATE_LIMITED` | The portal object-read budget is exhausted |\n| 502 | `STORAGE_OBJECT_STREAM_FAILED` | Error while transferring the object's content (only for `?inline=true` mode) |\n\nFor the full list of general errors, see [Errors](\u002Fdocs\u002Ferrors).\n\n- **An app key with no employee session sees only the app-shared file.** Employees of an app claim\n  logical names independently of each other, so several objects may share the same name. A request made with\n  an app key and NO `Authorization` header addresses the app-shared file; if the name is held solely by\n  per-employee files, the response is `404 STORAGE_OBJECT_NOT_FOUND`. To reach an employee's file, pass\n  that employee's session in `Authorization: Bearer`, or address the object by its identifier.\n\n## See also\n\n- [Objects](\u002Fdocs\u002Fstorage\u002Fobjects)\n- [List objects](\u002Fdocs\u002Fstorage\u002Fobjects\u002Flist)\n- [Object metadata](\u002Fdocs\u002Fstorage\u002Fobjects\u002Fhead)\n- [Upload](\u002Fdocs\u002Fstorage\u002Fupload)\n","2026-10-23",{},1794739607312]