Returns a URL for downloading a file uploaded within a message. Files must previously have been uploaded to Google Cloud Storage using a URL generated by getuploadurl. For more information, see the File System Guide.

URL Parameters

None.

Body Parameters

NameDescriptionJSON typeRequiredDefault Value
fileKeysAn array of file IDs.Array of stringsYes

Authentication

JwtAuthenticator, Oauth2Authenticator, AnonymousAuthenticator

Authorization

PERM_TOPIC_READ

Example Request

URL

POST https://spacesapis.zang.io/api/files/getdownloadurl

Headers

Authorization: "jwt eyJhbGciOiJSUzI1NiIsIdfgdfgnR5cCI6IkpXVCJ9.eyJ1c2VyX2lkX3NpZyI6ImxPWHpxNzVzR3J3X0xwWEMyRGRMakhyYXJlWVhyTzFMdEZHZkhkOWNkTXciLCJwcm9kdWN0X3R5cGUiOiJhY2NvdW50cyIsImxhc3R1cGRhdGV0aW1lIjoiMjAxNy0wMS0zMFQxMzo1ODo0Ny4yMDYiLCJpc3MiOiJ6YW5nLmlvIiwicHVibGlja2V5aWQiOiJhZ3h6Zm05dVpYTnVZVEl3TVRSeUdnc1NEVWRLZDNSUWRXSnNhV05MWlhrdfgdWdJQ2dsUEtFakFvTSIsImV4cCI6MTQ5NTM5MTIwMywidXNlcl9pZCI6ImFneHpmbTl1WlhOdVlUSXdNVFJ5RVFzU0JGVnpaWElZZ0lEQXMtX25fUW9NIiwidmVyIjoiMi4wIn0.SqZpw1uPIebqW3qlDsm0-DWYFKEH0SgPwtD-tSESWOF-5hLkZMqJH28ooWux2S7s9riIew7pTVPnZpTgJa5zHcEAG0gXSEJVOqmpGp_4ufM8YtZoZMpBFjyAkwyAt-ILkGUYIo0GU5WyzMPLV8YLXfgdfgOgkE2MGGOajBkjPmC2Db3pA0D0M9k-21EL1gwWBC5YIq0PDAkgulegwl6khRmB8irJQ-dfg-d-KV9eYfFpsCdJKRGzSfqg"

Or

Authorization: "bearer f746696f5de4528u128ae2f274eea253e8a7943a"

Body

{
  "fileKeys": ["7603a87b-ebf3-4028-b853-a77a00fe5d33"]
}

Example Response

{
  "data": [
    {
      "fileKey": "7603a87b-ebf3-4028-b853-a77a00fe5d33",
      "url": "https://storage.googleapis.com/onesnatesting/logan%2F7603a87b-ebf3-4028-b853-a77a00fe5d33?GoogleAccessId=logan-testing@onesnatesting.iam.gserviceaccount.com&Expires=1493150432&Signature=c6eQc8pu%2FUcmMB823vTpZXkDj6KDjnT%2FaYpuC6dGeNTJjwKLbACjvkp9Lfh3SvGMTQLSTI%2BjEROz8jQJsVvwnHL8g83%2BSl3AbkzkVzvUJtRzqVGlmqbwG0VUaAc29bGfGSHx7FJR%2BJOQq80OV2KBc0y0ORIv5JRm5ze6m6twS5HtKOK%2FP11qwZfIXh1x6w%2FRrYVTpWGsjuIXPpJ1G%2FLiiDRtitDgowLfRLt3H402g0JATBq5%2Bn9r5vPG7%2Bh2%2BMUyejyo50HZ5LIEkkNqHSNuc6fcrDdJkV4zV%2FlqQuPmZYBIWFhXKGQ6rcHleZ61pjSgUPOlxd%2FsY6kKOKkcLizVgg%3D%3D"
    }
  ]
}