Downloading Attachments via Direct Link


Follow

Overview

This article provides instructions for retrieving files from cases without using the FogBugz User Interface. This solution provides an option for customers when they have a need to download files programmatically because of issues with the API.

 

Prerequisite

Issue an API Token from an admin account (recommended) or an account with access to the case containing the file.


 

Download Procedure

This procedure also works for those cases that you require you to download the files from a server or a 3rd party application or require you to download the file without an available login to the system.

  1. Obtain the link to the file in the FogBugz case by taking the following steps:

    1. In Chrome, right-click over the attachment.

    2. Select Copy link address
      Example:
      https://your-account.fogbugz.com/default.asp?ixAttachment=65&pg=pgDownload&pgType=pgFile&sFilename=image(26).png

       

      Note: If you attempt to open this link directly (without login to FogBugz), the system will deny you the requested file. The request to download the files must come from an authorized user account.

       

  2. Attach to the end of the URI the API token obtained in the Prerequisite from an admin user or a user with access to the case containing the attachment.
    Example:

    https://your-account.fogbugz.com/default.asp?ixAttachment=65&pg=pgDownload&pgType=pgFile&sFilename=image(26).png&token={add_your_token_here}

Back to the top


 

Validation

Once you append the API token to the download link URI, you will be able to download the file in question. The token will serve as an authentication mechanism authorizing the requester to download the file.

 

Important: If you are using the method above to download attachments, please note that if the account associated with the API token changes the password, the token expires. Therefore, if you suddenly lose the capacity to download attachments, check that the API token you are using is up-to-date or that it corresponds to a user with access to the attachment.

Back to the top