---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / downloadBundle

# Function: downloadBundle()

> **downloadBundle**(`options`, `auth`): `Promise`\<[`DownloadBundleResult`](../interfaces/DownloadBundleResult.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/push.ts:385](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/operations/mrt/push.ts#L385)

Gets a presigned URL to download a bundle archive.

The returned URL is valid for one hour.

## Parameters

### options

[`DownloadBundleOptions`](../interfaces/DownloadBundleOptions.md)

Download options

### auth

[`AuthStrategy`](../../../auth/interfaces/AuthStrategy.md)

Authentication strategy (ApiKeyStrategy)

## Returns

`Promise`\<[`DownloadBundleResult`](../interfaces/DownloadBundleResult.md)\>

Download URL result

## Throws

Error if request fails

## Example

```typescript
import { ApiKeyStrategy } from '@salesforce/b2c-tooling-sdk/auth';
import { downloadBundle } from '@salesforce/b2c-tooling-sdk/operations/mrt';

const auth = new ApiKeyStrategy(process.env.MRT_API_KEY!, 'Authorization');

const result = await downloadBundle({
  projectSlug: 'my-storefront',
  bundleId: 12345
}, auth);

console.log(`Download URL: ${result.downloadUrl}`);
```
