I need to download Magento 2.0.2 with a direct download link, in the website you can download in this page but the link genereted is dynamic. So for example I like DownThemAll tool to download but it doesn't work. I see this question How to download magento but this solution is for version , in fact for me this solution don't work.

Context: My connection is very slow and it usually crashes and I cannot resume the download

Any idea or advice?


3 Answers 3

  1. First you need to generate download token. Login to your account on magento.com and generate it in Account Settings->Downloads Access Token
  2. You will need your MAGEID as well. It is shown at the top-left in your account page.
  3. curl -k https://MAGEID:TOKEN@www.magentocommerce.com/products/downloads/info/help
  4. Profit!

Source here.

  • curl -k https://MyMAGID:MyToken@www.magentocommerce.com/products/downloads/info/filter/version/2.0.* and I got this message No results found. In fact I try with tehe example /downloads/info/filter/version/1.9.* and I got the same message. I found my id and generate the token as you say Apr 5, 2016 at 15:45
  • 1
    @Cyberguille the API seems down beetween march (~19th) and april (~21st) 2016 // source : gist.github.com/piotrekkaminski/9bc45ec84028611d621e
    – Nolwennig
    Dec 13, 2016 at 10:07

Well as this question doesn't seem to be getting old any time sooner, because of obvious reason that Magento Community after releasing several 2.x versions have changed their APIs for direct download link generations.

While many users prefer to download Magento sources(especially 2.x versions) from Github, for those who still prefer to download from Magento website, here is the sure-shot alternate way, which is almost direct as it can get.

So firstly, you need few things to get started:

  1. Magento Download Credentials(if you don't have Magento account, then just create it here, else just login into your account and go to My Account and get below details, generate Access Token if you don't have it yet):

    1.1 MAGEID
    1.2 Download Access Token

  2. Below given form script which will be used for ddl generation:

    if($_SERVER['REQUEST_METHOD'] == 'POST') {
        $fileExt = $_POST['typeoffile'];
        $finalUrl = "https://".$_POST['MAGEID'].":".$_POST['Download_Access_Token']."@www.magentocommerce.com/products/downloads/info/filter/version/".$_POST['Magento_Version'];
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $finalUrl);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        $result = curl_exec($ch);
        if (curl_errno($ch)) {
            echo 'Error:' . curl_error($ch);
        curl_close ($ch);
        if (preg_match_all("/([^ ]+).${fileExt}/", $result, $matches)) {
            foreach ($matches[0] as $match) {
                if(strpos($match, "Magento-") !== false) $filesList[] = $match;
    <!DOCTYPE html>
            <title>Magento Source Direct Download Link Generator</title>
            <style type="text/css">
                .ddlTextbox {
                    height: 20px;
                    width: 400px;
                    border: 1px solid black;
            <form method="post" action="<?php echo $_SERVER['PHP_SELF'] ?>" name="MageDDLForm">
                <input type="text" name="MAGEID" placeholder="MAGEID" class="ddlTextbox"><br/><br/>
                <input type="text" name="Download_Access_Token" placeholder="Download Access Token" class="ddlTextbox"><br/><br/>
                <input type="text" name="Magento_Version" placeholder="Magento Version" class="ddlTextbox"><br/><br/>
                <input type="text" name="typeoffile" placeholder="File Type" class="ddlTextbox"><br/><br/>
                <button type="submit">
                        <span>Generate DDL</span>
                    echo "<pre>Links of files to download are as follows: <br/>";
                    $itr = 0;
                    foreach ($filesList as $fileName) {
                        $textToCopy = "curl -O https://MAG005200257:9950ab04e82f33fa57e4b5ae7eacd8ac342f0d42@www.magentocommerce.com/products/downloads/file/".$fileName;
                        echo "<textarea id=\"link-${itr}\" rows=\"4\" cols=\"50\">".$textToCopy."</textarea><br/>";
                        echo "<button class=\"btn\" data-clipboard-action=\"copy\" data-clipboard-target=\"#link-${itr}\">Copy to Clipboard</button><br/>";
                    echo "</pre>";
            <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
            <script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/1.7.1/clipboard.min.js"></script>
            <script type="text/javascript">
                $(function() {
                    new Clipboard('.btn');
    1. Git Bash installed for Windows users as Linux and Mac users already have command line, but cURL application is required to be installed and available throughout entire system, for those too.

When everything is in place, put the given script in your webroot directory and run the script in the browser and provide the necessary details as per the labels, additionally:

Magento Version - could be any version 2.1.x(give it like 2.1.10) or 2.0.x(2.0.17) or 2.2.x(2.2.0) File Type - tar.gz, zip or tar.bz2

Then click on "Generate DDL" button and see that the links are generated in form of curl command, which you can copy by clicking "Copy to Clipboard" button under respective textareas.

Then open the Git Bash in this same webroot directory and paste this command and run it, and see it has started downloading already.

Hope this helps as many as it could.


I try from this link and it works https://github.com/magento/magento2/releases

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.