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 following downloads will be 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 email. The package information requires link id and secret.

MASV Logo

GET /links/{link_id}

HEADERS
Name Type Required Description
X-Link-Password String No Sender supplied password associated with the package
QUERY
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"

A successful 200 OK response would look like the following:

{
  "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.

2) Obtain file listing for the package

GET /packages/{package_id}/files

HEADERS
Name Type Required Description
X-Package-Token String YES Package JSON Web Token
REQUEST
curl -H "X-Package-Token: $PACKAGE_TOKEN" -X GET "https://api.massive.app/v1/packages/$PACKAGE_ID/files"

Where:

  • $PACKAGE_ID is the id obtained from Step 1
  • $PACKAGE_TOKEN is the access token obtained from Step 1

A successful 200 OK response would look like the following:

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

GET /packages/{package_id}/files/{file_id}/download

HEADERS
Name Type Required Description
X-Package-Token String YES Package JSON Web Token
REQUEST
curl -H "X-Package-Token: $PACKAGE_TOKEN" -X GET "https://api.massive.app/v1/packages/$PACKAGE_ID/files/$FILES_ID/download"

Where:

  • $PACKAGE_ID is the id obtained from Step 1
  • $PACKAGE_TOKEN is the access token obtained from Step 1
  • $FILES_ID is the file id obtained from Step 2

A successful 200 OK response would look like the following:

{
  "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
curl -X $METHOD $URL > /path/to/target/file

Where:

  • $METHODis the method obtained from Step 3
  • $URL is the URL obtained from Step 3