Skip to content

Downloads

MASV clients download files directly from MASV's third-party storage service provider (such as Microsoft Azure Blob Storage or Amazon AWS S3). The MASV API supplies authorized links in order to carry out the downloads from these storage services.

MASV makes the following downloads available:

  • Each individual file that was uploaded as part of the package.
  • A zip file for Microsoft Windows and Linux platforms.
  • A zip file for macOS platforms.

The package link information can be obtained from the recipient's email. The package information requires the link_id and secret. (See the Links page for more details and examples.)

MASV Logo

ROUTE
Method Route
GET /links/{{ link_id }}
HEADERS
Name Type Required Description
X-Link-Password String No Sender supplied password associated with the package
URL Parameters
Name Type Required Description
secret String Yes Secret token associated with the download link
REQUEST
curl -H "X-Link-Password: $PACKAGE_PASSWORD" \
-X GET "https://api.massive.app/v1/links/$LINK_ID?secret=$SECRET"

After a successful request the API will respond with status code 200 OK and a body response matching the JSON below.

{
  "branding": {
    "primary_color": "#1DD4CA"
  },
  "expiry": "2019-02-13T21:33:50.944Z",
  "id": "01D2TMG9F5GHMHX8RWZ453VA35",
  "name": "MASV Package",
  "package_id": "01D2TMG9F0J6JD5SJ55NY27MXJ",
  "package_size": 28176354,
  "package_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1NDk5ODQ2OTksImltcCI6ZmFsc2UsImxpZCI6IjAxRDJUTUc5RjVHSE1IWDhSV1o0NTNWQTM1IiwibHZsIjoiZCIsInN1YiI6IjAxRDJUTUc5RjBKNkpENVNKNTVOWTI3TVhKIiwidHlwIjoicGFja2FnZSJ9.aq1f0UpKDPac8fkdOlPV2_S2eYBKOh-wUydv-GBFXZw",
  "recipient_email": "[email protected]",
  "sender_email": "[email protected]"
}

Note

The package_id and package_token are required to list the files associated with the package.

Note

Requests for packages containing greater than 10,000 files will be rate limited to once every 5 seconds.

2) Obtain file listing for the package

Method Route
GET /packages/{{ package_id }}/files
HEADERS
Name Type Required Description
X-Package-Token String YES Package JSON Web Token
URL Parameters
Name Type Required Description
package_id String YES Package ID obtained from step 1.
REQUEST
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-X GET "https://api.massive.app/v1/packages/$PACKAGE_ID/files"

After a successful request the API will respond with status code 200 OK and a body response matching the json below:

[
  {
    "id": "01D2TMGA09VHKVW6G3MJH2EP57",
    "kind": "file",
    "last_modified": "0001-01-01T00:00:00.000Z",
    "name": "Hawaii_4_27Retina_L.jpg",
    "size": 14914472,
    "virus_detected": false
  },
  {
    "id": "01D2TMGA09RBKG9H29HVZPGSMX",
    "kind": "file",
    "last_modified": "0001-01-01T00:00:00.000Z",
    "name": "Hawaii_4_27Retina_R.jpg",
    "size": 13261882,
    "virus_detected": false
  },
  {
    "id": "01D2TMGZMRZNDWD3852NNASF4D",
    "kind": "zip_windows",
    "last_modified": "2019-02-03T21:34:13.655Z",
    "name": "windows.zip",
    "virus_detected": false
  },
  {
    "id": "01D2TMGZMSGYSXFB7MV5V9ZM0X",
    "kind": "zip_mac",
    "last_modified": "2019-02-03T21:34:13.657Z",
    "name": "mac.zip",
    "virus_detected": false
  }
]

Note

Files with virus_detected: true indicate that a virus has been detected in the file contents and it cannot be downloaded for security purposes. A 403 status code will be returned if an attempt is made to download it.

Method Route
GET /packages/{package_id}/files/{file_id}/download
HEADERS
Name Type Required Description
X-Package-Token String YES Package JSON Web Token
URL Parameters
Name Type Required Description
package_id String YES Package ID obtained from step 1.
files_id String YES Files ID obtained from step 2.
REQUEST
curl -H "X-Package-Token: $PACKAGE_TOKEN" \
-X GET "https://api.massive.app/v1/packages/$PACKAGE_ID/files/$FILES_ID/download"

After a successful request the API will respond with status code 200 OK and a body response matching the json below:

{
  "method": "GET",
  "url": "https://masv3-storage-stag-wdc.s3-accelerate.amazonaws.com/01D2TMG9F0J6JD5SJ55NY27MXJ/01D2TMGA09VHKVW6G3MJH2EP57?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAJT7DTCC6DRVEACYQ%2F20190205%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20190205T152017Z&X-Amz-Expires=86399&X-Amz-SignedHeaders=host&x-custom_id=01D20E4YGW8D777N8X0FF2F78P&x-custom_imp=0&x-custom_link_id=01D2TMG9F5GHMHX8RWZ453VA35&x-custom_pkg_id=01D2TMG9F0J6JD5SJ55NY27MXJ&X-Amz-Signature=fbfa915207a87c17a5bcb56442d08e16bfc8dda55ca2310b797e14480bd81e5c"
}

4) Download the file

Request Parameters
Name Type Required Description
method String YES Method obtained from Step 3.
url String YES URL obtained from Step 3.
REQUEST
curl -X $METHOD $URL > /path/to/target/file