> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidocs.me-mate.net/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidocs.me-mate.net/_mcp/server.

# Get Download URL

GET https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download

## Get Download URL

Generates a **temporary signed download URL** for a specific file.

**Method:** `GET`\
**URL:** `{{base_url}}/files/{{file_id}}/download`

***

## Authentication

This endpoint requires authentication.

* **Recommended:** Bearer token in the `Authorization` header:

```http
Authorization: Bearer {{access_token}}

```

Notes:

* If your collection/folder already sets auth, this request can **inherit auth**.

* Ensure `{{access_token}}` is a valid, non-expired token.

***

## Required variables

Set these variables at the **environment** or **collection** level:

| Variable       | Required | Description                                                                   |
| -------------- | -------- | ----------------------------------------------------------------------------- |
| `base_url`     | Yes      | Base API URL (e.g. `https://business.me-mate.net/partners/wp-gallery/manage`) |
| `access_token` | Yes      | Access token used to authorize the request                                    |
| `file_id`      | Yes      | ID of the file to generate the download URL for                               |

***

## Path Parameters

| Parameter | Type    | Required | Description                   |
| --------- | ------- | -------- | ----------------------------- |
| `file_id` | integer | Yes      | Unique identifier of the file |

Example request URL:

```
{{base_url}}/files/34/download

```

***

## Sample request

```bash
curl --request GET "{{base_url}}/files/{{file_id}}/download" \
  --header "Authorization: Bearer {{access_token}}"

```

***

## Sample success response

A successful request typically returns **HTTP 200 OK**.

```json
{
  "success": true,
  "data": {
    "download_url": "https://business.me-mate.net/cdngallery/9f86443bd9f2ad28d1be4b62e8783e96720ec87a2ba86fcbeb5fc537483bf05b/files/9/IilyM1n82ClVahgh.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=KBJGD07BGCOFODLECTF4/20260310/eu-west-1/s3/aws4_request&X-Amz-Date=20260310T062115Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=4f2345e82432a46a793b150df1366dd139f677956de7f7ad4d34eba6d4315601"
  }
}

```

***

## Response fields

| Field          | Type   | Description                                    |
| -------------- | ------ | ---------------------------------------------- |
| `download_url` | string | Temporary signed URL used to download the file |

***

## Common errors

* **400 Bad Request**

  * Invalid or missing `file_id`
* **401 Unauthorized / 403 Forbidden**

  * Missing/invalid `Authorization` header

  * Expired `{{access_token}}`
* **404 Not Found**

  * File with the given `file_id` does not exist

***

## Notes

* The `download_url` is a **time-limited signed URL** generated by the storage provider.

* The URL may **expire after a specific duration** (e.g., 1 hour).

* This endpoint is useful when you want to **securely share a downloadable file without exposing direct storage paths**.

* Once the URL expires, a new request to this endpoint is required to generate another download link.

Reference: https://apidocs.me-mate.net/business-me-mate-net-ap-is-document-v-1-0/messenger-mate-gallery-app-file-upload-folder-management-api/file-upload-ap-is/get-download-url

## Response

### 200

OK

- `data` (object, required)
  - `download_url` (string, required)
- `success` (boolean, required)

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "data": {
    "download_url": "https://business.me-mate.net/cdngallery/7a9c3f1b2d4e5f67890abcde1234567890abcdef1234567890abcdef12345678/files/34/holiday_photo_2024.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ABCD1234EFGH5678IJKL/20240615/eu-west-1/s3/aws4_request&X-Amz-Date=20240615T101530Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3600&X-Amz-Signature=9f8e7d6c5b4a3210fedcba9876543210abcdef1234567890abcdef1234567890"
  },
  "success": true
}
```

**SDK Code**

```python
import requests

url = "https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download"

payload = {}
headers = {"Content-Type": "application/json"}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download';
const options = {method: 'GET', headers: {'Content-Type': 'application/json'}, body: '{}'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://business.me-mate.net/partners/wp-gallery/manage/files/%7Bfile_id%7D/download")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```