Skip to content

3QSDN/filedownload

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

3Q SDN Filedownload Examples

Download via CURL

  1. Get Download URI from the API

    GET https://sdn.3qsdn.com/api/v2/projects/{ProjectId}/files/{FileId}/output

    with the Header X-AUTH-APIKEY for authentication.

  2. If Content Distribution Protection enabled, generate [HASH] and [TimeStamp]

    Get SecurityKey from API

    GET https://sdn.3qsdn.com/api/v2/projects/{ProjectId}

    Generate DOWNLOAD_URI with SecurityKey and URI from API e.g. with this PHP Code:

    $expires = time() + 216000;
    $_user_agent = 'sdn-downloader';
    $hash = md5($expires.SecurityKey.$_user_agent, false);
    $DOWNLOAD_URI = str_replace(array("[HASH]", "[TimeStamp]"), array($hash, $expires), $URI);

    Note: the user_agent above and in download.sh scripts curl command must be the same.

    If Content Distribution Protection is disabled use the URI from API directly.

  3. Call download.sh

    download.sh DOWNLOAD_URI DST_FILENAME

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages