# Download Public Card

Learn how to download the retrieved digital business card as a .vcf file. To do this, we first obtain a secure download link through a POST request. Once we have received the link, it remains valid for 90 seconds.

### Step 1: Request secure download link

<mark style="color:green;">`POST`</mark> `/v1/public/card/{UUID}/download`

#### Path Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| UUID<mark style="color:red;">\*</mark> | string | Card UUID   |

{% tabs %}
{% tab title="200: OK " %}
You will get a link on a successfull response, please redirect the user to this link to place the download:

```html
https://api.becard.me/v1/public/card/{UUID}/download?expires=1697762081&signature=e337ab0f1e6a1e2b3b4a52c62b215ce78e67fb7fe1dd9e19d87ef9026d5499ce
```

{% endtab %}
{% endtabs %}

### Step 2: Download the card

Redirect the user to the link from the response of the <mark style="color:green;">`POST`</mark> Request in [Step 1](#step-1-request-secure-download-link) to download the digital business card as <mark style="color:purple;">`.vcf`</mark> file.

## Download Apple Wallet

Becard offers the option to not only download `.vcf` files but also to save the digital business card directly in your Apple Wallet as a <mark style="color:purple;">`.pem`</mark> file. The process is identical as with `.vcf` files, except for the use of a URI that differs from the REST API URI.

### Step 1: Request secure download link

{% code title="WALLET BASE URL:" %}

```html
https://wallet.becard.me
```

{% endcode %}

<mark style="color:green;">`POST`</mark> `https://wallet.becard.me/v1/apple-wallet/generate/{UUID}`

#### Path Parameters

| Name                                   | Type   | Description |
| -------------------------------------- | ------ | ----------- |
| UUID<mark style="color:red;">\*</mark> | string | Card UUID   |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "secure_download": "https://wallet.becard.me/v1/apple-wallet/generate/{UUID}?expires=1697763640&signature=2849e534a64eb369ab8a2cc42bff6d6efc860a646728888e36b2f3c3b2b711a2"
}
```

{% endtab %}
{% endtabs %}

### Step 2: Download the Apple Wallet

Redirect the user to the link from the response of the <mark style="color:green;">`POST`</mark> Request in Step 1 to download the digital business card as <mark style="color:purple;">`.pem`</mark>  and store it into the Apple Wallet file.
